Changeset 5870ac55 in rtems for cpukit/rtems/inline


Ignore:
Timestamp:
Jan 5, 2000, 10:19:21 PM (22 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
ef03d0e
Parents:
5283cc82
Message:

Added support for simple binary semaphores in addition to the high
power binary/mutex style semaphores already supported by RTEMS. This
was done at the request of Eric Norum <eric@…> in support
of his effort to port EPICS to RTEMS. This change consisted of
changing the nesting_allowed boolean into a lock_nesting_behavior
enumerated value as well as allowing the core mutex object to optionally
support ensuring that the holder of a binary semaphore released it.
Finally, a more subtle enhancement was to allow the non-holder to release
a priority inheritance/ceiling mutex and still allow the holding task
to return to its original priority.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpukit/rtems/inline/rtems/rtems/attr.inl

    r5283cc82 r5870ac55  
    120120)
    121121{
    122   return ( attribute_set & RTEMS_BINARY_SEMAPHORE );
     122  return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE);
     123}
     124
     125/*PAGE
     126 *
     127 *  _Attributes_Is_simple_binary_semaphore
     128 *
     129 *  DESCRIPTION:
     130 *
     131 *  This function returns TRUE if the simple binary semaphore attribute is
     132 *  enabled in the attribute_set and FALSE otherwise.
     133 */
     134
     135RTEMS_INLINE_ROUTINE boolean _Attributes_Is_simple_binary_semaphore(
     136  rtems_attribute attribute_set
     137)
     138{
     139  return
     140    ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_SIMPLE_BINARY_SEMAPHORE);
     141
     142
     143/*PAGE
     144 *
     145 *  _Attributes_Is_counting_semaphore
     146 *
     147 *  DESCRIPTION:
     148 *
     149 *  This function returns TRUE if the counting semaphore attribute is
     150 *  enabled in the attribute_set and FALSE otherwise.
     151 */
     152
     153RTEMS_INLINE_ROUTINE boolean _Attributes_Is_counting_semaphore(
     154  rtems_attribute attribute_set
     155)
     156{
     157  return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE);
    123158}
    124159
     
    159194/*PAGE
    160195 *
    161  *  _Attributes_Is_nesting_allowed
    162  *
    163  *  DESCRIPTION:
    164  *
    165  *  This function returns TRUE if the nesting allowed attribute
    166  *  is enabled in the attribute_set and FALSE otherwise.
    167  */
    168  
    169 RTEMS_INLINE_ROUTINE boolean _Attributes_Is_nesting_allowed(
    170   rtems_attribute attribute_set
    171 )
    172 {
    173    return ( !(attribute_set & RTEMS_NO_NESTING_ALLOWED) );
    174 }
    175 
    176 /*PAGE
    177  *
    178196 *  _Attributes_Is_system_task
    179197 *
Note: See TracChangeset for help on using the changeset viewer.