1 | /** |
---|
2 | * @file rtems/posix/key.inl |
---|
3 | */ |
---|
4 | |
---|
5 | /* rtems/posix/key.inl |
---|
6 | * |
---|
7 | * This include file contains the static inline implementation of the private |
---|
8 | * inlined routines for POSIX key's. |
---|
9 | * |
---|
10 | * COPYRIGHT (c) 1989-1999. |
---|
11 | * On-Line Applications Research Corporation (OAR). |
---|
12 | * |
---|
13 | * The license and distribution terms for this file may be |
---|
14 | * found in the file LICENSE in this distribution or at |
---|
15 | * http://www.rtems.com/license/LICENSE. |
---|
16 | * |
---|
17 | * $Id$ |
---|
18 | */ |
---|
19 | |
---|
20 | #ifndef _RTEMS_POSIX_KEY_H |
---|
21 | # error "Never use <rtems/posix/key.inl> directly; include <rtems/posix/key.h> instead." |
---|
22 | #endif |
---|
23 | |
---|
24 | #ifndef _RTEMS_POSIX_KEY_INL |
---|
25 | #define _RTEMS_POSIX_KEY_INL |
---|
26 | |
---|
27 | /*PAGE |
---|
28 | * |
---|
29 | * _POSIX_Keys_Allocate |
---|
30 | */ |
---|
31 | |
---|
32 | RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) |
---|
33 | { |
---|
34 | return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); |
---|
35 | } |
---|
36 | |
---|
37 | /*PAGE |
---|
38 | * |
---|
39 | * _POSIX_Keys_Free |
---|
40 | */ |
---|
41 | |
---|
42 | RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( |
---|
43 | POSIX_Keys_Control *the_key |
---|
44 | ) |
---|
45 | { |
---|
46 | _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); |
---|
47 | } |
---|
48 | |
---|
49 | /*PAGE |
---|
50 | * |
---|
51 | * _POSIX_Keys_Get |
---|
52 | */ |
---|
53 | |
---|
54 | RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Get ( |
---|
55 | Objects_Id id, |
---|
56 | Objects_Locations *location |
---|
57 | ) |
---|
58 | { |
---|
59 | return (POSIX_Keys_Control *) |
---|
60 | _Objects_Get( &_POSIX_Keys_Information, id, location ); |
---|
61 | } |
---|
62 | |
---|
63 | /*PAGE |
---|
64 | * |
---|
65 | * _POSIX_Keys_Is_null |
---|
66 | */ |
---|
67 | |
---|
68 | RTEMS_INLINE_ROUTINE boolean _POSIX_Keys_Is_null ( |
---|
69 | POSIX_Keys_Control *the_key |
---|
70 | ) |
---|
71 | { |
---|
72 | return !the_key; |
---|
73 | } |
---|
74 | |
---|
75 | #endif |
---|
76 | /* end of include file */ |
---|
77 | |
---|