[5e9b32b] | 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 | * |
---|
[08311cc3] | 6 | * COPYRIGHT (c) 1989-1999. |
---|
[5e9b32b] | 7 | * On-Line Applications Research Corporation (OAR). |
---|
| 8 | * |
---|
[98e4ebf5] | 9 | * The license and distribution terms for this file may be |
---|
| 10 | * found in the file LICENSE in this distribution or at |
---|
[03f2154e] | 11 | * http://www.OARcorp.com/rtems/license.html. |
---|
[5e9b32b] | 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 | |
---|
[503dc058] | 24 | RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control |
---|
[5e9b32b] | 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 | |
---|
[503dc058] | 36 | RTEMS_INLINE_ROUTINE void _POSIX_Condition_variables_Free ( |
---|
[5e9b32b] | 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 | |
---|
[503dc058] | 51 | RTEMS_INLINE_ROUTINE POSIX_Condition_variables_Control *_POSIX_Condition_variables_Get ( |
---|
[5e9b32b] | 52 | Objects_Id *id, |
---|
| 53 | Objects_Locations *location |
---|
| 54 | ) |
---|
| 55 | { |
---|
[799a5b9] | 56 | /* XXX should support COND_INITIALIZER */ |
---|
[df49c60] | 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; |
---|
[5e9b32b] | 63 | } |
---|
| 64 | |
---|
| 65 | /*PAGE |
---|
| 66 | * |
---|
| 67 | * _POSIX_Condition_variables_Is_null |
---|
| 68 | */ |
---|
| 69 | |
---|
[503dc058] | 70 | RTEMS_INLINE_ROUTINE boolean _POSIX_Condition_variables_Is_null ( |
---|
[5e9b32b] | 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 | |
---|