Fetch the semaphore sets "struct semid_ds", storing it in the memory pointed to by arg.buf.
IPC_SET
Changes the sem_perm.uid, sem_perm.gid, and sem_perm.mode members of the semaphore sets "struct semid_ds" to match those of the struct pointed to by arg.buf. The calling processs effective uid must match either sem_perm.uid or sem_perm.cuid, or it must have superuser privileges.
IPC_RMID
Immediately removes the semaphore set from the system. The calling processs effective uid must equal the semaphore sets sem_perm.uid or sem_perm.cuid, or the process must have superuser privileges.
GETVAL
Return the value of semaphore number semnum.
SETVAL
Set the value of semaphore number semnum to arg.val. Outstanding adjust on exit values for this semaphore in any process are cleared.
GETPID
Return the pid of the last process to perform an operation on semaphore number semnum.
GETNCNT
Return the number of processes waiting for semaphore number semnum s value to become greater than its current value.
GETZCNT
Return the number of processes waiting for semaphore number semnum s value to become 0.
GETALL
Fetch the value of all of the semaphores in the set into the array pointed to by arg.array.
SETALL
Set the values of all of the semaphores in the set to the values in the array pointed to by arg.array. Outstanding adjust on exit values for all semaphores in this set, in any process are cleared.
The .Vt "struct semid_ds" is defined as follows:
struct semid_ds {
struct ipc_perm sem_perm; /* operation permission struct */
struct sem *sem_base; /* pointer to first semaphore in set */
u_short sem_nsems; /* number of sems in set */
time_t sem_otime; /* last operation time */
long sem_pad1; /* SVABI/386 says I need this here */
time_t sem_ctime; /* last change time */
/* Times measured in secs since */
/* 00:00:00 GMT, Jan. 1, 1970 */
long sem_pad2; /* SVABI/386 says I need this here */
long sem_pad3[4]; /* SVABI/386 says I need this here */
};