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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [inline/] [rtems/] [posix/] [cond.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/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: cond.inl,v 1.2 2001-09-27 11:59:14 chris Exp $
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
 
24
RTEMS_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
 
36
RTEMS_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
 
51
RTEMS_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
 
70
RTEMS_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
 

powered by: WebSVN 2.1.0

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