Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   semctl    ( 2 )

операции управления семафором System V (System V semaphore control operations)

  Name  |  Synopsis  |  Description  |    Return value    |  Error  |  Conforming to  |  Note  |  Examples  |  See also  |

Возвращаемое значение (Return value)

On success, semctl() returns a nonnegative value depending on cmd as follows:

GETNCNT the value of semncnt.

GETPID the value of sempid.

GETVAL the value of semval.

GETZCNT the value of semzcnt.

IPC_INFO the index of the highest used entry in the kernel's internal array recording information about all semaphore sets. (This information can be used with repeated SEM_STAT or SEM_STAT_ANY operations to obtain information about all semaphore sets on the system.)

SEM_INFO as for IPC_INFO.

SEM_STAT the identifier of the semaphore set whose index was given in semid.

SEM_STAT_ANY as for SEM_STAT.

All other cmd values return 0 on success.

On failure, semctl() returns -1 and sets errno to indicate the error.