summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-08 09:13:59 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-11-12 13:25:39 +0100
commitbdd4eb8786a7bac71ea9e95c2b313b0014e77f81 (patch)
tree1f629d20a3b6e57b62aca5d6c8a52cde29f0cdce
parentrtems: Move internal structures to asrdata.h (diff)
downloadrtems-bdd4eb8786a7bac71ea9e95c2b313b0014e77f81.tar.bz2
rtems: Remove Modes_Control
Use rtems_mode directly. This is in line with rtems_attribute and rtems_option. Update #3598.
-rw-r--r--cpukit/include/rtems/rtems/asrdata.h2
-rw-r--r--cpukit/include/rtems/rtems/modes.h4
-rw-r--r--cpukit/include/rtems/rtems/modesimpl.h26
-rw-r--r--cpukit/include/rtems/rtems/types.h5
-rw-r--r--cpukit/rtems/src/modes.c2
-rw-r--r--cpukit/rtems/src/signalcatch.c2
-rw-r--r--testsuites/sptests/sp08/init.c3
-rw-r--r--testsuites/sptests/sp47/init.c3
8 files changed, 20 insertions, 27 deletions
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;
diff --git a/testsuites/sptests/sp08/init.c b/testsuites/sptests/sp08/init.c
index 6a9ee76119..98a7fccdcf 100644
--- a/testsuites/sptests/sp08/init.c
+++ b/testsuites/sptests/sp08/init.c
@@ -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 );
diff --git a/testsuites/sptests/sp47/init.c b/testsuites/sptests/sp47/init.c
index ae295089af..c0503477ab 100644
--- a/testsuites/sptests/sp47/init.c
+++ b/testsuites/sptests/sp47/init.c
@@ -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);