Multithread
A collection of modules for programming in multithreaded environments (obviously all thread safe).
Note
Provides some wrappers around POSIX multithread primitives (e.g., sem_t) which may seem unnecessary, BUT provides a small Platform Abstraction Layer (PAL) so that applications can use the same API on Linux, RTEMS, etc.
The multithread library is comprised of the following modules:
Module |
Notes |
Link |
---|---|---|
Memory pool |
Used by threads to request/release memory chunks of a specified
size. Useful in publisher-subscriber settings (e.g., |
|
Binary semaphore |
||
Condition variable |
On linux: Wrapper around POSIX condition variables. |
|
Counting semaphore |
On linux: wrapper around POSIX semaphores. |
|
Mutex |
On linux: wrapper around POSIX mutexes. |
|
Condition variable/mutex pair (cvm) |
A single interface for using both, as they are frequently used together. |
|
Producer-consumer queue |
Can handle multiple producers and consumers |
|
Fair reader/writer lock |
A completely fair lock that guarantees that neither readers nor writers will starve. |
|
OpenMP modules |
Implementations of 2D kernel convolution, radix sort |
|
Thread management tools |
E.g., locking threads to a particular core. |
N/A |