From bdd4eb8786a7bac71ea9e95c2b313b0014e77f81 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 8 Nov 2018 09:13:59 +0100 Subject: rtems: Remove Modes_Control Use rtems_mode directly. This is in line with rtems_attribute and rtems_option. Update #3598. --- cpukit/include/rtems/rtems/asrdata.h | 2 +- cpukit/include/rtems/rtems/modes.h | 4 ++-- cpukit/include/rtems/rtems/modesimpl.h | 26 +++++++++++++------------- cpukit/include/rtems/rtems/types.h | 5 ----- cpukit/rtems/src/modes.c | 2 +- cpukit/rtems/src/signalcatch.c | 2 +- 6 files changed, 18 insertions(+), 23 deletions(-) (limited to 'cpukit') diff --git a/cpukit/include/rtems/rtems/asrdata.h b/cpukit/include/rtems/rtems/asrdata.h index 1068bc2e48..70b2416257 100644 --- a/cpukit/include/rtems/rtems/asrdata.h +++ b/cpukit/include/rtems/rtems/asrdata.h @@ -39,7 +39,7 @@ typedef struct { /** This field indicates if address of the signal handler function. */ rtems_asr_entry handler; /** This field indicates if the task mode the signal will run with. */ - Modes_Control mode_set; + rtems_mode mode_set; /** This field indicates the signal set that is posted. */ rtems_signal_set signals_posted; /** This field indicates the signal set that is pending. */ diff --git a/cpukit/include/rtems/rtems/modes.h b/cpukit/include/rtems/rtems/modes.h index 547ae13e05..4c9f74edba 100644 --- a/cpukit/include/rtems/rtems/modes.h +++ b/cpukit/include/rtems/rtems/modes.h @@ -41,7 +41,7 @@ extern "C" { * The following type defines the control block used to manage * each a mode set. */ -typedef uint32_t Modes_Control; +typedef uint32_t rtems_mode; /** * The following constants define the individual modes and masks @@ -118,7 +118,7 @@ extern const uint32_t rtems_interrupt_mask; * @note This variable is used by bindings from languages other than * C and C++. */ -Modes_Control rtems_interrupt_level_body( +rtems_mode rtems_interrupt_level_body( uint32_t level ); diff --git a/cpukit/include/rtems/rtems/modesimpl.h b/cpukit/include/rtems/rtems/modesimpl.h index 8c1acc7cb9..318cc36fd7 100644 --- a/cpukit/include/rtems/rtems/modesimpl.h +++ b/cpukit/include/rtems/rtems/modesimpl.h @@ -39,8 +39,8 @@ extern "C" { * are set in mode_set, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Modes_Mask_changed ( - Modes_Control mode_set, - Modes_Control masks + rtems_mode mode_set, + rtems_mode masks ) { return ( mode_set & masks ) ? true : false; @@ -53,7 +53,7 @@ RTEMS_INLINE_ROUTINE bool _Modes_Mask_changed ( * Signal Processing is disabled, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled ( - Modes_Control mode_set + rtems_mode mode_set ) { return (mode_set & RTEMS_ASR_MASK) == RTEMS_NO_ASR; @@ -66,7 +66,7 @@ RTEMS_INLINE_ROUTINE bool _Modes_Is_asr_disabled ( * is enabled, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt ( - Modes_Control mode_set + rtems_mode mode_set ) { return (mode_set & RTEMS_PREEMPT_MASK) == RTEMS_PREEMPT; @@ -79,7 +79,7 @@ RTEMS_INLINE_ROUTINE bool _Modes_Is_preempt ( * is enabled, and FALSE otherwise. */ RTEMS_INLINE_ROUTINE bool _Modes_Is_timeslice ( - Modes_Control mode_set + rtems_mode mode_set ) { return (mode_set & RTEMS_TIMESLICE_MASK) == RTEMS_TIMESLICE; @@ -91,7 +91,7 @@ RTEMS_INLINE_ROUTINE bool _Modes_Is_timeslice ( * This function returns the interrupt level portion of the mode_set. */ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( - Modes_Control mode_set + rtems_mode mode_set ) { return ( mode_set & RTEMS_INTERRUPT_MASK ); @@ -104,7 +104,7 @@ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level ( * in the mode_set. */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( - Modes_Control mode_set + rtems_mode mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); @@ -120,14 +120,14 @@ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( * is returned in changed. */ RTEMS_INLINE_ROUTINE void _Modes_Change ( - Modes_Control old_mode_set, - Modes_Control new_mode_set, - Modes_Control mask, - Modes_Control *out_mode_set, - Modes_Control *changed + rtems_mode old_mode_set, + rtems_mode new_mode_set, + rtems_mode mask, + rtems_mode *out_mode_set, + rtems_mode *changed ) { - Modes_Control _out_mode; + rtems_mode _out_mode; _out_mode = old_mode_set; _out_mode &= ~mask; diff --git a/cpukit/include/rtems/rtems/types.h b/cpukit/include/rtems/rtems/types.h index 874b077b79..2028c427f0 100644 --- a/cpukit/include/rtems/rtems/types.h +++ b/cpukit/include/rtems/rtems/types.h @@ -167,11 +167,6 @@ typedef struct { uint32_t ticks; } rtems_time_of_day; -/** - * @brief Task mode type. - */ -typedef Modes_Control rtems_mode; - /* * MPCI related entries */ diff --git a/cpukit/rtems/src/modes.c b/cpukit/rtems/src/modes.c index acc499377c..198ce29329 100644 --- a/cpukit/rtems/src/modes.c +++ b/cpukit/rtems/src/modes.c @@ -26,7 +26,7 @@ const uint32_t rtems_interrupt_mask = RTEMS_INTERRUPT_MASK; -Modes_Control rtems_interrupt_level_body( +rtems_mode rtems_interrupt_level_body( uint32_t level ) { diff --git a/cpukit/rtems/src/signalcatch.c b/cpukit/rtems/src/signalcatch.c index 9c264b7869..435ea2fa54 100644 --- a/cpukit/rtems/src/signalcatch.c +++ b/cpukit/rtems/src/signalcatch.c @@ -36,7 +36,7 @@ void _Signal_Action_handler( RTEMS_API_Control *api; ASR_Information *asr; rtems_signal_set signal_set; - Modes_Control prev_mode; + rtems_mode prev_mode; (void) action; -- cgit v1.2.3