Synchronization services

QNX SDP8.0System ArchitectureDeveloperUser

The QNX OS provides the POSIX-standard thread-level synchronization primitives, all of which can be used between threads in different processes.

The synchronization services include at least the following:
  • mutexes
  • condvars
  • barriers
  • reader/writer locks
  • semaphores
  • send/receive/reply
  • atomic operations

You can share mutexes, condvars, barriers, reader/writer locks, and semaphores between processes, but this requires extra configuration; refer to Sharing synchronization objects between processes later in this chapter.

The above synchronization primitives are implemented directly by the kernel, except for atomic operations, which are implemented directly by the processor.

Note:
For the first five synchronization primitives listed above, and for any objects you plan to use atomic operations on, you should allocate them only in normal memory mappings. On certain processors, atomic operations and calls such as pthread_mutex_lock() cause a fault if the object is allocated in uncached memory.
Page updated: