source: rtems/cpukit/posix/inline/rtems/posix/cond.inl @ 08311cc3

4.104.114.84.95
Last change on this file since 08311cc3 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 17, 1999 at 5:51:34 PM

Updated copyright notice.

  • 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 really should validate pointer */
57/* XXX should support COND_INITIALIZER */
58  return (POSIX_Condition_variables_Control *)
59    _Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
60}
61 
62/*PAGE
63 *
64 *  _POSIX_Condition_variables_Is_null
65 */
66 
67RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null (
68  POSIX_Condition_variables_Control *the_condition_variable
69)
70{
71  return !the_condition_variable;
72}
73
74#endif
75/*  end of include file */
76
Note: See TracBrowser for help on using the repository browser.