source: rtems/cpukit/posix/src/semaphoredeletesupp.c @ 811fae1

4.104.114.84.95
Last change on this file since 811fae1 was 799c767, checked in by Joel Sherrill <joel.sherrill@…>, on 11/02/99 at 18:00:15

Split the POSIX semaphore manager into multiple files.

  • Property mode set to 100644
File size: 990 bytes
Line 
1/*
2 *  $Id$
3 */
4
5#include <stdarg.h>
6
7#include <errno.h>
8#include <fcntl.h>
9#include <pthread.h>
10#include <semaphore.h>
11#include <limits.h>
12
13#include <rtems/system.h>
14#include <rtems/score/object.h>
15#include <rtems/posix/semaphore.h>
16#include <rtems/posix/time.h>
17#include <rtems/posix/seterr.h>
18
19/*PAGE
20 *
21 *  _POSIX_Semaphore_Delete
22 */
23
24void _POSIX_Semaphore_Delete(
25  POSIX_Semaphore_Control *the_semaphore
26)
27{
28  if ( !the_semaphore->linked && !the_semaphore->open_count ) {
29    _POSIX_Semaphore_Free( the_semaphore );
30
31#if defined(RTEMS_MULTIPROCESSING)
32    if ( the_semaphore->process_shared == PTHREAD_PROCESS_SHARED ) {
33
34      _Objects_MP_Close(
35        &_POSIX_Semaphore_Information,
36        the_semaphore->Object.id
37      );
38
39      _POSIX_Semaphore_MP_Send_process_packet(
40        POSIX_SEMAPHORE_MP_ANNOUNCE_DELETE,
41        the_semaphore->Object.id,
42        0,                         /* Not used */
43        0                          /* Not used */
44      );
45    }
46#endif
47
48  }
49}
Note: See TracBrowser for help on using the repository browser.