semun

Contains values for a semctl command.

Service:Synchronization

Structure

  #include <sys/sem.h>
  
  union semun
  {
     int                val;
     struct semid_ds   *buf;
     unsigned short    *array;
  };151
  

Fields

val

Specifies the value to set for or to get from the semaphore. This element is used by the SETVAL command.

buf

Points to a semaphore data structure. This element is used by the IPC_STAT and IPC_SET commands.

array

Points to an array of integer values to use in setting or retrieving all the semaphore values in a set. This element is used by the GETALL and SETALL commands.