[PATCH v2 1/4] rtems: Remove _Modes_Set_interrupt_level()
Sebastian Huber
sebastian.huber at embedded-brains.de
Fri Feb 19 09:40:35 UTC 2021
This call just obfuscated the call to _ISR_Set_level().
Update #4244.
---
cpukit/include/rtems/rtems/modesimpl.h | 14 --------------
cpukit/rtems/src/taskmode.c | 3 ++-
2 files changed, 2 insertions(+), 15 deletions(-)
diff --git a/cpukit/include/rtems/rtems/modesimpl.h b/cpukit/include/rtems/rtems/modesimpl.h
index 5677c7f13d..2b5e00f600 100644
--- a/cpukit/include/rtems/rtems/modesimpl.h
+++ b/cpukit/include/rtems/rtems/modesimpl.h
@@ -19,7 +19,6 @@
#define _RTEMS_RTEMS_MODESIMPL_H
#include <rtems/rtems/modes.h>
-#include <rtems/score/isrlevel.h>
#ifdef __cplusplus
extern "C" {
@@ -86,19 +85,6 @@ RTEMS_INLINE_ROUTINE ISR_Level _Modes_Get_interrupt_level (
return ( mode_set & RTEMS_INTERRUPT_MASK );
}
-/**
- * @brief Sets the current interrupt level to that specified in the mode_set.
- *
- * This routine sets the current interrupt level to that specified
- * in the mode_set.
- */
-RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level (
- rtems_mode mode_set
-)
-{
- _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
-}
-
#ifdef __cplusplus
}
#endif
diff --git a/cpukit/rtems/src/taskmode.c b/cpukit/rtems/src/taskmode.c
index 24905368c3..77338723b8 100644
--- a/cpukit/rtems/src/taskmode.c
+++ b/cpukit/rtems/src/taskmode.c
@@ -23,6 +23,7 @@
#include <rtems/rtems/tasksdata.h>
#include <rtems/rtems/modesimpl.h>
#include <rtems/rtems/signalimpl.h>
+#include <rtems/score/isrlevel.h>
#include <rtems/score/schedulerimpl.h>
#include <rtems/score/smpimpl.h>
#include <rtems/score/threadimpl.h>
@@ -116,7 +117,7 @@ rtems_status_code rtems_task_mode(
* Set the new interrupt level
*/
if ( mask & RTEMS_INTERRUPT_MASK ) {
- _Modes_Set_interrupt_level( mode_set );
+ _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) );
}
/*
--
2.26.2
More information about the devel
mailing list