The pid_t, time_t, key_t, and size_t types shall be defined as described in <sys/types.h>.

A semaphore shall be represented by an anonymous structure containing the following members:

unsigned short semval Semaphore value.
pid_t sempid Process ID of last operation.
unsigned short semncnt Number of processes waiting for semval to become greater than current value.
unsigned short semzcnt Number of processes waiting for semval to become 0.