source: rtems/cpukit/posix/inline/rtems/posix/mqueue.inl @ 65800393

4.104.114.84.95
Last change on this file since 65800393 was 65800393, checked in by Jennifer Averett <Jennifer.Averett@…>, on 01/05/00 at 17:16:48

Added priority conversion between POSIX and core.

  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*  rtems/posix/mqueue.inl
2 *
3 *  This include file contains the static inline 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 
24RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Allocate( void )
25{
26  return (POSIX_Message_queue_Control *)
27    _Objects_Allocate( &_POSIX_Message_queue_Information );
28}
29 
30/*PAGE
31 *
32 *  _POSIX_Message_queue_Free
33 */
34 
35RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Free (
36  POSIX_Message_queue_Control *the_mq
37)
38{
39  _Objects_Free( &_POSIX_Message_queue_Information, &the_mq->Object );
40}
41
42/*PAGE
43 *
44 *  _POSIX_Message_queue_Namespace_remove
45 */
46 
47RTEMS_INLINE_ROUTINE void _POSIX_Message_queue_Namespace_remove (
48  POSIX_Message_queue_Control *the_mq
49)
50{
51  _Objects_Namespace_remove(
52    &_POSIX_Message_queue_Information, &the_mq->Object );
53}
54 
55/*PAGE
56 *
57 *  _POSIX_Message_queue_Get
58 */
59 
60RTEMS_INLINE_ROUTINE POSIX_Message_queue_Control *_POSIX_Message_queue_Get (
61  Objects_Id         id,
62  Objects_Locations *location
63)
64{
65  return (POSIX_Message_queue_Control *)
66    _Objects_Get( &_POSIX_Message_queue_Information, id, location );
67}
68 
69/*PAGE
70 *
71 *  _POSIX_Message_queue_Is_null
72 */
73 
74RTEMS_INLINE_ROUTINE boolean _POSIX_Message_queue_Is_null (
75  POSIX_Message_queue_Control *the_mq
76)
77{
78  return !the_mq;
79}
80
81/*PAGE
82 *
83 *  _POSIX_Message_queue_Priority_to_core
84 */
85 
86RTEMS_INLINE_ROUTINE CORE_message_queue_Submit_types _POSIX_Message_queue_Priority_to_core(
87  unsigned int priority
88)
89{
90  return priority * -1;
91}
92
93/*
94 *  _POSIX_Message_queue_Priority_from_core
95 *
96 *  DESCRIPTION:
97 *
98 *  XXX
99 */
100 
101RTEMS_INLINE_ROUTINE unsigned int _POSIX_Message_queue_Priority_from_core(
102  CORE_message_queue_Submit_types priority
103)
104{
105  return abs( priority );
106}
107
108#endif
109/*  end of include file */
110
Note: See TracBrowser for help on using the repository browser.