1 | /* rtems/posix/mqueue.inl |
---|
2 | * |
---|
3 | * This include file contains the macro implementation of the private |
---|
4 | * inlined routines for POSIX Message Queue. |
---|
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_MESSAGE_QUEUE_inl |
---|
17 | #define __RTEMS_POSIX_MESSAGE_QUEUE_inl |
---|
18 | |
---|
19 | /*PAGE |
---|
20 | * |
---|
21 | * _POSIX_Message_queue_Allocate |
---|
22 | */ |
---|
23 | |
---|
24 | #define _POSIX_Message_queue_Allocate() \ |
---|
25 | (POSIX_Message_queue_Control *) \ |
---|
26 | _Objects_Allocate( &_POSIX_Message_queue_Information ) |
---|
27 | |
---|
28 | /*PAGE |
---|
29 | * |
---|
30 | * _POSIX_Message_queue_Free |
---|
31 | */ |
---|
32 | |
---|
33 | #define _POSIX_Message_queue_Free( _the_mq ) \ |
---|
34 | _Objects_Free( &_POSIX_Message_queue_Information, &(_the_mq)->Object ) |
---|
35 | |
---|
36 | /*PAGE |
---|
37 | * |
---|
38 | * _POSIX_Message_queue_Namespace_remove |
---|
39 | */ |
---|
40 | |
---|
41 | #define _POSIX_Message_queue_Namespace_remove( _the_mq ) \ |
---|
42 | _Objects_Namespace_remove( \ |
---|
43 | &_POSIX_Message_queue_Information, &(_the_mq)->Object ) |
---|
44 | |
---|
45 | /*PAGE |
---|
46 | * |
---|
47 | * _POSIX_Message_queue_Get |
---|
48 | */ |
---|
49 | |
---|
50 | #define _POSIX_Message_queue_Get( _id, _location ) \ |
---|
51 | (POSIX_Message_queue_Control *) \ |
---|
52 | _Objects_Get( &_POSIX_Message_queue_Information, (_id), (_location) ) |
---|
53 | |
---|
54 | /*PAGE |
---|
55 | * |
---|
56 | * _POSIX_Message_queue_Is_null |
---|
57 | */ |
---|
58 | |
---|
59 | #define _POSIX_Message_queue_Is_null( _the_mq ) \ |
---|
60 | (!(_the_mq)) |
---|
61 | |
---|
62 | /*PAGE |
---|
63 | * |
---|
64 | * _POSIX_Message_queue_Priority_to_core |
---|
65 | */ |
---|
66 | |
---|
67 | #define _POSIX_Message_queue_Priority_to_core( _priority ) \ |
---|
68 | ((_priority) * -1) |
---|
69 | |
---|
70 | /* |
---|
71 | * _POSIX_Message_queue_Priority_from_core |
---|
72 | */ |
---|
73 | |
---|
74 | /* absolute value without a library dependency */ |
---|
75 | #define _POSIX_Message_queue_Priority_from_core( _priority ) \ |
---|
76 | ((((CORE_message_queue_Submit_types)(_priority)) >= 0) ? \ |
---|
77 | (_priority) : \ |
---|
78 | -((CORE_message_queue_Submit_types)(_priority))) |
---|
79 | |
---|
80 | #endif |
---|
81 | /* end of include file */ |
---|
82 | |
---|