source: rtems/cpukit/rtems/inline/rtems/rtems/message.inl @ 27b299d9

4.104.114.84.95
Last change on this file since 27b299d9 was 27b299d9, checked in by Ralf Corsepius <ralf.corsepius@…>, on 02/21/05 at 07:39:58

New header guards.

  • Property mode set to 100644
File size: 1.9 KB
Line 
1/**
2 * @file rtems/rtems/message.inl
3 */
4
5/*
6 *  This include file contains the static inline implementation of all
7 *  inlined routines in the Message Manager.
8 *
9 *  COPYRIGHT (c) 1989-1999.
10 *  On-Line Applications Research Corporation (OAR).
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.rtems.com/license/LICENSE.
15 *
16 *  $Id$
17 */
18
19#ifndef _RTEMS_RTEMS_MESSAGE_INL
20#define _RTEMS_RTEMS_MESSAGE_INL
21
22#include <rtems/score/wkspace.h>
23
24/*PAGE
25 *
26 *  _Message_queue_Is_null
27 *
28 *  DESCRIPTION:
29 *
30 *  This function places the_message at the rear of the outstanding
31 *  messages on the_message_queue.
32 */
33
34RTEMS_INLINE_ROUTINE boolean _Message_queue_Is_null (
35  Message_queue_Control *the_message_queue
36)
37{
38  return ( the_message_queue == NULL  );
39}
40
41
42/*PAGE
43 *
44 *  _Message_queue_Free
45 *
46 *  DESCRIPTION:
47 *
48 *  This routine deallocates a message queue control block into
49 *  the inactive chain of free message queue control blocks.
50 */
51
52RTEMS_INLINE_ROUTINE void _Message_queue_Free (
53  Message_queue_Control *the_message_queue
54)
55{
56  _Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
57}
58
59/*PAGE
60 *
61 *  _Message_queue_Get
62 *
63 *  DESCRIPTION:
64 *
65 *  This function maps message queue IDs to message queue control
66 *  blocks.  If ID corresponds to a local message queue, then it
67 *  returns the_message_queue control pointer which maps to ID
68 *  and location is set to OBJECTS_LOCAL.  If the message queue ID is
69 *  global and resides on a remote node, then location is set
70 *  to OBJECTS_REMOTE, and the_message_queue is undefined.
71 *  Otherwise, location is set to OBJECTS_ERROR and
72 *  the_message_queue is undefined.
73 */
74
75RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
76  Objects_Id         id,
77  Objects_Locations *location
78)
79{
80  return (Message_queue_Control *)
81     _Objects_Get( &_Message_queue_Information, id, location );
82}
83
84#endif
85/* end of include file */
Note: See TracBrowser for help on using the repository browser.