OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [inline/] [rtems/] [posix/] [semaphore.inl] - Blame information for rev 593

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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: semaphore.inl,v 1.2 2001-09-27 11:59:14 chris Exp $
14
 */
15
 
16
#ifndef __RTEMS_POSIX_SEMAPHORE_inl
17
#define __RTEMS_POSIX_SEMAPHORE_inl
18
 
19
/*PAGE
20
 *
21
 *  _POSIX_Semaphore_Allocate
22
 */
23
 
24
RTEMS_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
 
35
RTEMS_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
 
47
RTEMS_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
 
62
RTEMS_INLINE_ROUTINE POSIX_Semaphore_Control *_POSIX_Semaphore_Get (
63
  Objects_Id        *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
 
76
RTEMS_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
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.