source: rtems/cpukit/posix/inline/rtems/posix/cond.inl @ df49c60

4.104.114.84.95
Last change on this file since df49c60 was df49c60, checked in by Joel Sherrill <joel.sherrill@…>, on Jun 12, 2000 at 3:00:15 PM

Merged from 4.5.0-beta3a

  • Property mode set to 100644
File size: 1.7 KB
Line 
1/*  rtems/posix/cond.inl
2 *
3 *  This include file contains the static inline implementation of the private
4 *  inlined routines for POSIX condition variables.
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_CONDITION_VARIABLES_inl
17#define __RTEMS_POSIX_CONDITION_VARIABLES_inl
18 
19/*PAGE
20 *
21 *  _POSIX_Condition_variables_Allocate
22 */
23 
24RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control
25  *_POSIX_Condition_variables_Allocate( void )
26{
27  return (POSIX_Condition_variables_Control *)
28    _Objects_Allocate( &_POSIX_Condition_variables_Information );
29}
30 
31/*PAGE
32 *
33 *  _POSIX_Condition_variables_Free
34 */
35 
36RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free (
37  POSIX_Condition_variables_Control *the_condition_variable
38)
39{
40  _Objects_Free(
41    &_POSIX_Condition_variables_Information,
42    &the_condition_variable->Object
43  );
44}
45 
46/*PAGE
47 *
48 *  _POSIX_Condition_variables_Get
49 */
50 
51RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
52  Objects_Id        *id,
53  Objects_Locations *location
54)
55{
56/* XXX should support COND_INITIALIZER */
57  if ( id )
58    return (POSIX_Condition_variables_Control *)
59      _Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
60
61  *location = OBJECTS_ERROR;
62  return NULL;
63}
64 
65/*PAGE
66 *
67 *  _POSIX_Condition_variables_Is_null
68 */
69 
70RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null (
71  POSIX_Condition_variables_Control *the_condition_variable
72)
73{
74  return !the_condition_variable;
75}
76
77#endif
78/*  end of include file */
79
Note: See TracBrowser for help on using the repository browser.