Table of Contents

NAME

SYNOPSIS

DESCRIPTION

The system call returns the semaphore identifier associated with

A new set containing semaphores is created if either is equal to IPC_PRIVATE, or does not have a semaphore set associated with it, and the IPC_CREAT bit is set in

If a new set of semaphores is created, the data structure associated with it (the structure, see is intialized as follows: and are set to the effective uid of the calling process. and are set to the effective gid of the calling process. is set to the lower 9 bits of is set to the value of is set to the current time is set to 0

RETURN VALUES

returns a non-negative semaphore identifier if successful. Otherwise, -1 is returned and is set to reflect the error.

ERRORS

The caller has no permission to access a semaphore set already associated with Both IPC_CREAT and IPC_EXCL are set in and a semaphore set is already associated with is less than 0 or greater than the system limit for the number in a semaphore set.

A semaphore set associated with exists, but has fewer semaphores than the number specified in A new set of semaphores could not be created because the system limit for the number of semaphores or the number of semaphore sets has been reached. IPC_CREAT was not set in and no semaphore set associated with was found.

SEE ALSO


Table of Contents