source: rtems/cpukit/score/macros/rtems/score/coremsg.inl @ 3652ad35

4.104.114.84.95
Last change on this file since 3652ad35 was 3652ad35, checked in by Joel Sherrill <joel.sherrill@…>, on 09/19/95 at 14:53:29

Minor bug fixes to get all targets compilable and running. The
single biggest changes were the expansion of the workspace size
macro to include other types of objects and the increase in the
minimum stack size for most CPUs.

  • Property mode set to 100644
File size: 2.9 KB
Line 
1/*  coremsg.inl
2 *
3 *  This include file contains the macro implementation of all
4 *  inlined routines in the Core Message Handler.
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 __CORE_MESSAGE_QUEUE_inl
18#define __CORE_MESSAGE_QUEUE_inl
19
20/*PAGE
21 *
22 *  _CORE_message_queue_Send
23 *
24 */
25 
26#define _CORE_message_queue_Send( _the_message_queue, _buffer, _size, \
27_id, _api_message_queue_mp_support ) \
28  _CORE_message_queue_Submit( (_the_message_queue), (_buffer), (_size), \
29     (_id), (_api_message_queue_mp_support), CORE_MESSAGE_QUEUE_SEND_REQUEST )
30 
31/*PAGE
32 *
33 *  _CORE_message_queue_Urgent
34 *
35 */
36 
37#define _CORE_message_queue_Urgent( _the_message_queue, _buffer, _size, \
38_id, _api_message_queue_mp_support ) \
39  _CORE_message_queue_Submit( (_the_message_queue), (_buffer), (_size), \
40     (_id), (_api_message_queue_mp_support), CORE_MESSAGE_QUEUE_URGENT_REQUEST )
41
42/*PAGE
43 *
44 *  _CORE_message_queue_Copy_buffer
45 */
46
47#define _CORE_message_queue_Copy_buffer( _source, _destination, _size ) \
48  memcpy( _destination, _source, _size)
49
50/*PAGE
51 *
52 *  _CORE_message_queue_Allocate_message_buffer
53 *
54 */
55
56#define _CORE_message_queue_Allocate_message_buffer( _the_message_queue ) \
57  (CORE_message_queue_Buffer_control *) \
58    _Chain_Get( &(_the_message_queue)->Inactive_messages )
59
60/*PAGE
61 *
62 *  _CORE_message_queue_Free_message_buffer
63 *
64 */
65
66#define _CORE_message_queue_Free_message_buffer( _the_message_queue, _the_message ) \
67  _Chain_Append( \
68    &(_the_message_queue)->Inactive_messages, \
69    &(_the_message)->Node \
70  )
71
72/*PAGE
73 *
74 *  _CORE_message_queue_Is_priority
75 *
76 */
77 
78#define _CORE_message_queue_Is_priority( _the_attribute ) \
79  ((_the_attribute)->discipline == CORE_MESSAGE_QUEUE_DISCIPLINES_PRIORITY)
80
81/*PAGE
82 *
83 *  _CORE_message_queue_Get_pending_message
84 *
85 */
86
87#define _CORE_message_queue_Get_pending_message( _the_message_queue ) \
88   (CORE_message_queue_Buffer_control *) \
89     _Chain_Get_unprotected( &(_the_message_queue)->Pending_messages )
90
91/*PAGE
92 *
93 *  _CORE_message_queue_Append
94 *
95 */
96
97#define _CORE_message_queue_Append( _the_message_queue, _the_message ) \
98   _Chain_Append( &(_the_message_queue)->Pending_messages, \
99                  &(_the_message)->Node )
100
101/*PAGE
102 *
103 *  _CORE_message_queue_Prepend
104 *
105 */
106
107#define _CORE_message_queue_Prepend( _the_message_queue, _the_message ) \
108   _Chain_Prepend( &(_the_message_queue)->Pending_messages, \
109                   &(_the_message)->Node )
110
111/*PAGE
112 *
113 *  _CORE_message_queue_Is_null
114 *
115 */
116
117#define _CORE_message_queue_Is_null( _the_message_queue ) \
118   ( (_the_message_queue) == NULL  )
119
120#endif
121/* end of include file */
Note: See TracBrowser for help on using the repository browser.