Semaphore operations are the same in both the Oracle Solaris Operating Environment and the POSIX environment. The function name changed from sema_ in the Oracle Solaris Operating Environment to sem_ in pthreads. This section discusses the following topics:
Initializing a semaphore
Incrementing a semaphore
Blocking on a semaphore count
Decrementing a semaphore count
Destroying the semaphore state