Linux provides Portable Operating System Interface (POSIX) semaphores, as well as pthread conditional variables to map the Win32 semaphore APIs. Both have their share of pros and cons. Get detailed code examples illustrating how to map Win32 to Linux with respect to semaphore application program interfaces (APIs).