RTEMS Logo

RTEMS 4.8.0 On-Line Library


Semaphore Manager sem_unlink - Unlink a semaphore

PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

9.4.5: sem_unlink - Unlink a semaphore

CALLING SEQUENCE:

int sem_unlink(
  const char *name
);

STATUS CODES:

EACCESS
Permission is denied to unlink a semaphore.
ENAMETOOLONG
The length of the strong name exceed NAME_MAX while POSIX_NO_TRUNC is in effect.
ENOENT
The name of the semaphore does not exist.
ENOSPC
There is insufficient space for the creation of a new named semaphore.
ENOSYS
The function sem_unlink is not supported by this implementation.

DESCRIPTION:

The sem_unlink() function shall remove the semaphore name by the string name. If a process is currently accessing the name semaphore, the sem_unlink command has no effect. If one or more processes have the semaphore open when the sem_unlink function is called, the destruction of semaphores shall be postponed until all reference to semaphore are destroyed by calls to sem_close, _exit(), or exec. After all references have been destroyed, it returns immediately.

If the termination is successful, the function shall return 0. Otherwise, a -1 is returned and the errno is set.

NOTES:


PREV UP NEXT Bookshelf RTEMS POSIX API User's Guide

Copyright © 1988-2007OAR Corporation