source: rtems/c/src/exec/posix/inline/rtems/posix/semaphore.inl @ 32ba727

4.104.114.84.95
Last change on this file since 32ba727 was 32ba727, checked in by Joel Sherrill <joel.sherrill@…>, on 01/22/01 at 13:46:28

2001-01-22 Michael Hamel <mhamel@…>

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