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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems-20020807/] [cpukit/] [posix/] [macros/] [rtems/] [posix/] [cond.inl] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1026 ivang
/*  rtems/posix/cond.inl
2
 *
3
 *  This include file contains the macro 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
 *  cond.inl,v 1.1 2000/12/01 18:57:36 joel 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
#define _POSIX_Condition_variables_Allocate() \
25
  (POSIX_Condition_variables_Control *) \
26
    _Objects_Allocate( &_POSIX_Condition_variables_Information )
27
 
28
/*PAGE
29
 *
30
 *  _POSIX_Condition_variables_Free
31
 */
32
 
33
#define _POSIX_Condition_variables_Free( _the_condition_variable ) \
34
  _Objects_Free( &_POSIX_Condition_variables_Information, \
35
    &(_the_condition_variable)->Object)
36
 
37
/*PAGE
38
 *
39
 *  _POSIX_Condition_variables_Get
40
 */
41
 
42
/* XXX how to write this as a macro */
43
static POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get (
44
  Objects_Id        *id,
45
  Objects_Locations *location
46
)
47
{
48
/* XXX should support COND_INITIALIZER */
49
  if ( id )
50
    return (POSIX_Condition_variables_Control *)
51
      _Objects_Get( &_POSIX_Condition_variables_Information, *id, location );
52
 
53
  *location = OBJECTS_ERROR;
54
  return NULL;
55
}
56
 
57
/*PAGE
58
 *
59
 *  _POSIX_Condition_variables_Is_null
60
 */
61
 
62
#define _POSIX_Condition_variables_Is_null( _the_condition_variable ) \
63
  (!(_the_condition_variable))
64
 
65
#endif
66
/*  end of include file */

powered by: WebSVN 2.1.0

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