rtems: Remove Modes_Control

Use rtems_mode directly.  This is in line with rtems_attribute and
rtems_option.

Update #3598.
This commit is contained in:
Sebastian Huber
2018-11-08 09:13:59 +01:00
parent 257cf743a5
commit bdd4eb8786
8 changed files with 20 additions and 27 deletions

View File

@@ -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. */

View File

@@ -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
);

View File

@@ -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;

View File

@@ -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
*/

View File

@@ -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
)
{

View File

@@ -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;

View File

@@ -20,8 +20,7 @@ const char rtems_test_name[] = "SP 8";
/* forward declarations to avoid warnings */
rtems_task Init(rtems_task_argument argument);
#define PRIxModes_Control PRIx32
#define PRIxrtems_mode PRIxModes_Control
#define PRIxrtems_mode PRIx32
#define put_mode( _comment, _output_mode ) \
printf( "%s %08" PRIxrtems_mode "\n", _comment, _output_mode );

View File

@@ -10,8 +10,7 @@
const char rtems_test_name[] = "SP 47";
#define PRIXModes_Control PRIX32
#define PRIXrtems_mode PRIXModes_Control
#define PRIXrtems_mode PRIX32
rtems_task test_asr(rtems_task_argument unused);
rtems_task Init(rtems_task_argument ignored);