1 | /* message.inl |
---|
2 | * |
---|
3 | * This include file contains the static inline implementation of all |
---|
4 | * inlined routines in the Message Manager. |
---|
5 | * |
---|
6 | * COPYRIGHT (c) 1989, 1990, 1991, 1992, 1993, 1994. |
---|
7 | * On-Line Applications Research Corporation (OAR). |
---|
8 | * All rights assigned to U.S. Government, 1994. |
---|
9 | * |
---|
10 | * This material may be reproduced by or for the U.S. Government pursuant |
---|
11 | * to the copyright license under the clause at DFARS 252.227-7013. This |
---|
12 | * notice must appear in all copies of this file and its derivatives. |
---|
13 | * |
---|
14 | * $Id$ |
---|
15 | */ |
---|
16 | |
---|
17 | #ifndef __MESSAGE_QUEUE_inl |
---|
18 | #define __MESSAGE_QUEUE_inl |
---|
19 | |
---|
20 | #include <rtems/score/wkspace.h> |
---|
21 | |
---|
22 | /*PAGE |
---|
23 | * |
---|
24 | * _Message_queue_Is_null |
---|
25 | * |
---|
26 | * DESCRIPTION: |
---|
27 | * |
---|
28 | * This function places the_message at the rear of the outstanding |
---|
29 | * messages on the_message_queue. |
---|
30 | */ |
---|
31 | |
---|
32 | RTEMS_INLINE_ROUTINE boolean _Message_queue_Is_null ( |
---|
33 | Message_queue_Control *the_message_queue |
---|
34 | ) |
---|
35 | { |
---|
36 | return ( the_message_queue == NULL ); |
---|
37 | } |
---|
38 | |
---|
39 | |
---|
40 | /*PAGE |
---|
41 | * |
---|
42 | * _Message_queue_Free |
---|
43 | * |
---|
44 | * DESCRIPTION: |
---|
45 | * |
---|
46 | * This routine deallocates a message queue control block into |
---|
47 | * the inactive chain of free message queue control blocks. |
---|
48 | */ |
---|
49 | |
---|
50 | RTEMS_INLINE_ROUTINE void _Message_queue_Free ( |
---|
51 | Message_queue_Control *the_message_queue |
---|
52 | ) |
---|
53 | { |
---|
54 | _Objects_Free( &_Message_queue_Information, &the_message_queue->Object ); |
---|
55 | } |
---|
56 | |
---|
57 | /*PAGE |
---|
58 | * |
---|
59 | * _Message_queue_Get |
---|
60 | * |
---|
61 | * DESCRIPTION: |
---|
62 | * |
---|
63 | * This function maps message queue IDs to message queue control |
---|
64 | * blocks. If ID corresponds to a local message queue, then it |
---|
65 | * returns the_message_queue control pointer which maps to ID |
---|
66 | * and location is set to OBJECTS_LOCAL. If the message queue ID is |
---|
67 | * global and resides on a remote node, then location is set |
---|
68 | * to OBJECTS_REMOTE, and the_message_queue is undefined. |
---|
69 | * Otherwise, location is set to OBJECTS_ERROR and |
---|
70 | * the_message_queue is undefined. |
---|
71 | */ |
---|
72 | |
---|
73 | RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get ( |
---|
74 | Objects_Id id, |
---|
75 | Objects_Locations *location |
---|
76 | ) |
---|
77 | { |
---|
78 | return (Message_queue_Control *) |
---|
79 | _Objects_Get( &_Message_queue_Information, id, location ); |
---|
80 | } |
---|
81 | |
---|
82 | #endif |
---|
83 | /* end of include file */ |
---|