OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [rtems/] [inline/] [rtems/] [rtems/] [message.inl] - Blame information for rev 30

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 30 unneback
/*  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-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: message.inl,v 1.2 2001-09-27 11:59:18 chris Exp $
14
 */
15
 
16
#ifndef __MESSAGE_QUEUE_inl
17
#define __MESSAGE_QUEUE_inl
18
 
19
#include 
20
 
21
/*PAGE
22
 *
23
 *  _Message_queue_Is_null
24
 *
25
 *  DESCRIPTION:
26
 *
27
 *  This function places the_message at the rear of the outstanding
28
 *  messages on the_message_queue.
29
 */
30
 
31
RTEMS_INLINE_ROUTINE boolean _Message_queue_Is_null (
32
  Message_queue_Control *the_message_queue
33
)
34
{
35
  return ( the_message_queue == NULL  );
36
}
37
 
38
 
39
/*PAGE
40
 *
41
 *  _Message_queue_Free
42
 *
43
 *  DESCRIPTION:
44
 *
45
 *  This routine deallocates a message queue control block into
46
 *  the inactive chain of free message queue control blocks.
47
 */
48
 
49
RTEMS_INLINE_ROUTINE void _Message_queue_Free (
50
  Message_queue_Control *the_message_queue
51
)
52
{
53
  _Objects_Free( &_Message_queue_Information, &the_message_queue->Object );
54
}
55
 
56
/*PAGE
57
 *
58
 *  _Message_queue_Get
59
 *
60
 *  DESCRIPTION:
61
 *
62
 *  This function maps message queue IDs to message queue control
63
 *  blocks.  If ID corresponds to a local message queue, then it
64
 *  returns the_message_queue control pointer which maps to ID
65
 *  and location is set to OBJECTS_LOCAL.  If the message queue ID is
66
 *  global and resides on a remote node, then location is set
67
 *  to OBJECTS_REMOTE, and the_message_queue is undefined.
68
 *  Otherwise, location is set to OBJECTS_ERROR and
69
 *  the_message_queue is undefined.
70
 */
71
 
72
RTEMS_INLINE_ROUTINE Message_queue_Control *_Message_queue_Get (
73
  Objects_Id         id,
74
  Objects_Locations *location
75
)
76
{
77
  return (Message_queue_Control *)
78
     _Objects_Get( &_Message_queue_Information, id, location );
79
}
80
 
81
#endif
82
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.