Inter-Process Communication
***************************

This chapter describes the glibcadj inter-process communication primitives.

Semaphores
==========

Theglibc implements the semaphore APIs as defined in POSIX and System V.  Semaphores can be used by multiple processes to coordinate shared resources.  The following is a complete list of the semaphore functions provided by theglibc.

System V Semaphores
-------------------

 -- Function: int semctl (int SEMID, int SEMNUM, int CMD)
     prelim mtsafe assafe/linux

 -- Function: int semget (key_t KEY, int NSEMS, int SEMFLG)

 -- Function: int semop (int SEMID, struct sembuf *SOPS, size_t NSOPS)

 -- Function: int semtimedop (int SEMID, struct sembuf *SOPS, size_t NSOPS, const struct timespec *TIMEOUT)

POSIX Semaphores
----------------

Theglibc provides POSIX semaphores as well.  These functions' names begin with sem_ and they are declared in semaphore.h.  See POSIX Semaphores.