source: rtems/cpukit/posix/src/semaphoredeletesupp.c @ 9809d6e0

5
Last change on this file since 9809d6e0 was 9809d6e0, checked in by Sebastian Huber <sebastian.huber@…>, on 03/30/16 at 09:39:58

score: _Thread_queue_Flush() parameter changes

Change _Thread_queue_Flush() into a macro that invokes
_Thread_queue_Do_flush() with the parameter set defined by
RTEMS_MULTIPROCESSING. For multiprocessing configurations add the
object identifier to avoid direct use of the thread wait information.

Use mp_ prefix for multiprocessing related parameters.

Rename Thread_queue_Flush_callout to Thread_queue_MP_callout since this
type will be re-used later for other operations as well.

  • Property mode set to 100644
File size: 934 bytes
Line 
1/**
2 *  @file
3 *
4 *  @brief POSIX Delete Semaphore
5 *  @ingroup POSIX_SEMAPHORE
6 */
7
8/*
9 *  COPYRIGHT (c) 1989-2007.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.org/license/LICENSE.
15 */
16
17#if HAVE_CONFIG_H
18#include "config.h"
19#endif
20
21#include <stdarg.h>
22
23#include <errno.h>
24#include <fcntl.h>
25#include <pthread.h>
26#include <semaphore.h>
27#include <limits.h>
28
29#include <rtems/system.h>
30#include <rtems/posix/semaphoreimpl.h>
31#include <rtems/seterr.h>
32
33void _POSIX_Semaphore_Delete(
34  POSIX_Semaphore_Control *the_semaphore
35)
36{
37  if ( !the_semaphore->linked && !the_semaphore->open_count ) {
38    _Objects_Close( &_POSIX_Semaphore_Information, &the_semaphore->Object );
39    _CORE_semaphore_Flush( &the_semaphore->Semaphore, -1, NULL, 0 );
40    _POSIX_Semaphore_Free( the_semaphore );
41  }
42}
Note: See TracBrowser for help on using the repository browser.