Synchronization services
QNX SDP8.0System ArchitectureDeveloperUser
The QNX OS provides the POSIX-standard thread-level synchronization primitives, some of which are useful even between threads in different processes.
The synchronization services include at least the following:
Synchronization service | Supported between processes |
---|---|
Mutexes | Yesa |
Condvars | Yes |
Barriers | Yesa |
Reader/writer locks | Yesa |
Semaphores | Yes |
Send/Receive/Reply | Yes |
Atomic operations | Yes |
The above synchronization primitives are implemented directly by the kernel, except for atomic operations (which are implemented directly by the processor).
Note:
You should allocate mutexes, condvars, barriers, reader/writer locks,
and semaphores, as well as objects you plan to use atomic operations on,
only in normal memory mappings.
On certain processors, atomic operations and calls such as
pthread_mutex_lock()
will cause a fault if the object is allocated in uncached memory.
Page updated:
a
Sharing this type of object between processes can be a security problem; see
Safely sharing mutexes, barriers, and reader/writer locks between processes,later in this chapter.