source: rtems/c/src/exec/score/inline/coremutex.inl @ 03f2154e

4.104.114.84.95
Last change on this file since 03f2154e was 03f2154e, checked in by Joel Sherrill <joel.sherrill@…>, on 04/22/97 at 17:20:27

headers updated to reflect new style copyright notice as part
of switching to the modified GNU GPL.

  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*  inline/coremutex.inl
2 *
3 *  This include file contains all of the inlined routines associated
4 *  with the CORE mutexes.
5 *
6 *  COPYRIGHT (c) 1989-1997.
7 *  On-Line Applications Research Corporation (OAR).
8 *  Copyright assigned to U.S. Government, 1994.
9 *
10 *  The license and distribution terms for this file may in
11 *  the file LICENSE in this distribution or at
12 *  http://www.OARcorp.com/rtems/license.html.
13 *
14 *  $Id$
15 */
16
17#ifndef __INLINE_CORE_MUTEX_inl
18#define __INLINE_CORE_MUTEX_inl
19
20/*PAGE
21 *
22 *  _CORE_mutex_Is_locked
23 *
24 *  DESCRIPTION:
25 *
26 *  This routine returns TRUE if the mutex specified is locked and FALSE
27 *  otherwise.
28 */
29 
30RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_locked(
31  CORE_mutex_Control  *the_mutex
32)
33{
34  return the_mutex->lock == CORE_MUTEX_LOCKED;
35}
36 
37/*PAGE
38 *
39 *  _CORE_mutex_Is_fifo
40 *
41 *  DESCRIPTION:
42 *
43 *  This routine returns TRUE if the mutex's wait discipline is FIFO and FALSE
44 *  otherwise.
45 */
46 
47RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_fifo(
48  CORE_mutex_Attributes *the_attribute
49)
50{
51  return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_FIFO;
52}
53 
54/*PAGE
55 *
56 *  _CORE_mutex_Is_priority
57 *
58 *  DESCRIPTION:
59 *
60 *  This routine returns TRUE if the mutex's wait discipline is PRIORITY and
61 *  FALSE otherwise.
62 */
63 
64RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_priority(
65  CORE_mutex_Attributes *the_attribute
66)
67{
68  return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY;
69}
70 
71/*PAGE
72 *
73 *  _CORE_mutex_Is_inherit_priority
74 *
75 *  DESCRIPTION:
76 *
77 *  This routine returns TRUE if the mutex's wait discipline is
78 *  INHERIT_PRIORITY and FALSE otherwise.
79 */
80 
81RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_inherit_priority(
82  CORE_mutex_Attributes *the_attribute
83)
84{
85  return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT;
86}
87 
88/*PAGE
89 *
90 *  _CORE_mutex_Is_priority_ceiling
91 *
92 *  DESCRIPTION:
93 *
94 *  This routine returns TRUE if the mutex's wait discipline is
95 *  PRIORITY_CEILING and FALSE otherwise.
96 */
97 
98RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_priority_ceiling(
99  CORE_mutex_Attributes *the_attribute
100)
101{
102  return the_attribute->discipline == CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING;
103}
104 
105/*PAGE
106 *
107 *  _CORE_mutex_Is_nesting_allowed
108 *
109 *  DESCRIPTION:
110 *
111 *  This routine returns TRUE if the mutex allows a task to obtain a
112 *  semaphore more than once and nest.
113 */
114 
115RTEMS_INLINE_ROUTINE boolean _CORE_mutex_Is_nesting_allowed(
116  CORE_mutex_Attributes *the_attribute
117)
118{
119  return the_attribute->allow_nesting == TRUE;
120 
121}
122 
123#endif
124/* end of include file */
Note: See TracBrowser for help on using the repository browser.