Contains information about an individual semaphore.
#include <sys/sem.h> struct sem { ushort_t semval; ushort_t semadj; pid_t sempid; ushort_t semncnt; ushort_t semzcnt; void *semptr; };
Specifies the semaphore value.
Specifies the last adjustment made to the semaphore. This field enables undo functionality.
Specifies the process ID of the last process that performed an operation with this semaphore.
Specifies the number of processes waiting for the semaphore count to increase.
Specifies the number of processes waiting for the semaphore count to go to zero.
Reserved for internal use.
The semid_ds structure contains an array of sem structures.