source: rtems/cpukit/posix/inline/rtems/posix/semaphore.inl @ f5c9b89

Last change on this file since f5c9b89 was f5c9b89, checked in by Joel Sherrill <joel.sherrill@…>, on 10/30/06 at 22:21:07

2006-10-30 Joel Sherrill <joel@…>

PR 841/rtems

  • itron/inline/rtems/itron/semaphore.inl, itron/macros/rtems/itron/semaphore.inl, itron/src/twai_sem.c, posix/include/rtems/posix/semaphore.h, posix/inline/rtems/posix/semaphore.inl, posix/src/semaphorewaitsupp.c, posix/src/semtimedwait.c, posix/src/semwait.c, rtems/src/semobtain.c, rtems/src/semtranslatereturncode.c, score/include/rtems/score/coresem.h, score/src/coresemseize.c: Make sem_timedwait more conformant to Open Group specification.
  • Property mode set to 100644
File size: 1.7 KB
Line 
1/**
2 * @file rtems/posix/semaphore.inl
3 */
4
5/*  rtems/posix/semaphore.inl
6 *
7 *  This include file contains the static inline implementation of the private
8 *  inlined routines for POSIX Semaphores.
9 *
10 *  COPYRIGHT (c) 1989-1999.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.com/license/LICENSE.
16 *
17 *  $Id$
18 */
19 
20#ifndef _RTEMS_POSIX_SEMAPHORE_INL
21#define _RTEMS_POSIX_SEMAPHORE_INL
22 
23/*PAGE
24 *
25 *  _POSIX_Semaphore_Allocate
26 */
27 
28RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Allocate( void )
29{
30  return (POSIX_Semaphore_Control *)
31    _Objects_Allocate( &_POSIX_Semaphore_Information );
32}
33 
34/*PAGE
35 *
36 *  _POSIX_Semaphore_Free
37 */
38 
39RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Free (
40  POSIX_Semaphore_Control *the_semaphore
41)
42{
43  _Objects_Free( &_POSIX_Semaphore_Information, &the_semaphore->Object );
44}
45 
46/*PAGE
47 *
48 *  _POSIX_Semaphore_Namespace_remove
49 */
50 
51RTEMS_INLINE_ROUTINE void _POSIX_Semaphore_Namespace_remove (
52  POSIX_Semaphore_Control *the_semaphore
53)
54{
55  _Objects_Namespace_remove(
56    &_POSIX_Semaphore_Information, &the_semaphore->Object );
57}
58 
59
60
61/*PAGE
62 *
63 *  _POSIX_Semaphore_Get
64 */
65 
66RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
67  sem_t             *id,
68  Objects_Locations *location
69)
70{
71  return (POSIX_Semaphore_Control *)
72    _Objects_Get( &_POSIX_Semaphore_Information, *id, location );
73}
74 
75/*PAGE
76 *
77 *  _POSIX_Semaphore_Is_null
78 */
79 
80RTEMS_INLINE_ROUTINE boolean _POSIX_Semaphore_Is_null (
81  POSIX_Semaphore_Control *the_semaphore
82)
83{
84  return !the_semaphore;
85}
86
87#endif
88/*  end of include file */
89
Note: See TracBrowser for help on using the repository browser.