IT lexicon › Programming › Mailbox (RTOS)

Mailbox (RTOS)

Programming På svenska → Updated: 2026-11-03

A message queue with room for exactly one message — often just a pointer — that a task can block on until something arrives.

The pattern was popularised by µC/OS, where OSMboxPost and OSMboxPend passed a single pointer between tasks. An empty slot blocks the receiver; a full one blocks or rejects the sender. FreeRTOS has no dedicated mailbox but suggests a length-one queue with xQueueOverwrite, so the latest value always wins — handy for a sensor reading nobody wants the stale version of.

The word also names a hardware block in multicore SoCs: a register one core writes to that raises an interrupt on another. Same idea, except the postman is made of silicon.

← Back to the lexicon