diff options
Diffstat (limited to '')
-rw-r--r-- | c/src/exec/rtems/inline/rtems/rtems/attr.inl | 48 |
1 files changed, 33 insertions, 15 deletions
diff --git a/c/src/exec/rtems/inline/rtems/rtems/attr.inl b/c/src/exec/rtems/inline/rtems/rtems/attr.inl index 94a8052648..d35be0dca4 100644 --- a/c/src/exec/rtems/inline/rtems/rtems/attr.inl +++ b/c/src/exec/rtems/inline/rtems/rtems/attr.inl @@ -119,58 +119,76 @@ RTEMS_INLINE_ROUTINE boolean _Attributes_Is_binary_semaphore( rtems_attribute attribute_set ) { - return ( attribute_set & RTEMS_BINARY_SEMAPHORE ); + return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_BINARY_SEMAPHORE); } /*PAGE * - * _Attributes_Is_inherit_priority + * _Attributes_Is_simple_binary_semaphore * * DESCRIPTION: * - * This function returns TRUE if the priority inheritance attribute - * is enabled in the attribute_set and FALSE otherwise. + * This function returns TRUE if the simple binary semaphore attribute is + * enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE boolean _Attributes_Is_inherit_priority( +RTEMS_INLINE_ROUTINE boolean _Attributes_Is_simple_binary_semaphore( + rtems_attribute attribute_set +) +{ + return + ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_SIMPLE_BINARY_SEMAPHORE); +} + +/*PAGE + * + * _Attributes_Is_counting_semaphore + * + * DESCRIPTION: + * + * This function returns TRUE if the counting semaphore attribute is + * enabled in the attribute_set and FALSE otherwise. + */ + +RTEMS_INLINE_ROUTINE boolean _Attributes_Is_counting_semaphore( rtems_attribute attribute_set ) { - return ( attribute_set & RTEMS_INHERIT_PRIORITY ); + return ((attribute_set & RTEMS_SEMAPHORE_CLASS) == RTEMS_COUNTING_SEMAPHORE); } /*PAGE * - * _Attributes_Is_priority_ceiling + * _Attributes_Is_inherit_priority * * DESCRIPTION: * - * This function returns TRUE if the priority ceiling attribute + * This function returns TRUE if the priority inheritance attribute * is enabled in the attribute_set and FALSE otherwise. */ - -RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority_ceiling( + +RTEMS_INLINE_ROUTINE boolean _Attributes_Is_inherit_priority( rtems_attribute attribute_set ) { - return ( attribute_set & RTEMS_PRIORITY_CEILING ); + return ( attribute_set & RTEMS_INHERIT_PRIORITY ); } /*PAGE * - * _Attributes_Is_nesting_allowed + * _Attributes_Is_priority_ceiling * * DESCRIPTION: * - * This function returns TRUE if the nesting allowed attribute + * This function returns TRUE if the priority ceiling attribute * is enabled in the attribute_set and FALSE otherwise. */ -RTEMS_INLINE_ROUTINE boolean _Attributes_Is_nesting_allowed( +RTEMS_INLINE_ROUTINE boolean _Attributes_Is_priority_ceiling( rtems_attribute attribute_set ) { - return ( !(attribute_set & RTEMS_NO_NESTING_ALLOWED) ); + return ( attribute_set & RTEMS_PRIORITY_CEILING ); } /*PAGE |