Inter-Task Communication (ITC) and Synchronization

The criterion. A robust, deterministic set of primitives to pass data and manage dependencies between concurrent tasks — semaphores, mutexes, message queues, event flags, task notifications — ideally with zero-copy (pointer-passing) queuing.

How Revera answers it

Revera ships the classic synchronization primitives — counting/binary semaphores, mutexes with priority inheritance, and condition variables — plus SMP spinlocks and read-mostly seqlocks. All sync objects are kernel-owned opaque handles (validated integer handles into static pools), which is what makes them safe to hand to unprivileged threads: a forged or stale handle is rejected, never dereferenced (see Memory Protection & Isolation).

Message queues, event flags, and task notifications are not in 0.1.0 — Revera provides the primitives and a documented Tier-C extension seam (kernel/tk_kernel_sync.h) on which a queue / mailbox / barrier is built, rather than a fixed set of higher-level channels. Zero-copy pointer passing is therefore up to the app (a semaphore-gated shared buffer) today.

Feature · how to turn it on · how to use it · where it works

Feature

Turn on with

Use these APIs

Where

Counting / binary semaphore

—

tk_sem_create, tk_sem_pend / post / pend_timeout

all

Mutex + priority inheritance

— (PI is the default protocol)

tk_mutex_create, lock / unlock / lock_timeout, tk_mutexattr_settype / setprotocol

all

Condition variable

—

tk_cond_create, wait / wait_timeout / signal / broadcast

all

SMP spinlock

—

tk_spin_init / lock / unlock / trylock

SMP builds

Seqlock (read-mostly)

—

tk_seq_init / write_begin / write_end / read_begin / read_retry

SMP builds

Full signatures and contracts: API reference — Synchronization.

Limits & roadmap

  • No message queues / event flags / task notifications in 0.1.0 — build them on the Tier-C wait/wake seam, or wait for the roadmap. No built-in zero-copy queue — pass pointers through a semaphore-guarded buffer.

  • Priority inheritance is single-level (one boost per contended lock); there is no priority-ceiling protocol.

Learn more