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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [rtems/] [c/] [src/] [exec/] [posix/] [inline/] [rtems/] [posix/] [mqueue.inl] - Blame information for rev 846

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

Line No. Rev Author Line
1 30 unneback
/*  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: mqueue.inl,v 1.2 2001-09-27 11:59:14 chris Exp $
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
 
24
RTEMS_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
 
35
RTEMS_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
 
47
RTEMS_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
 
60
RTEMS_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
 
74
RTEMS_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
 
86
RTEMS_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
 
101
RTEMS_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
 

powered by: WebSVN 2.1.0

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