summaryrefslogtreecommitdiffstats
path: root/cpukit/score/include/rtems/score/thread.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-06-25 13:48:00 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-06-25 13:55:34 +0200
commitbd67d7d2f8c9925517416b58196ca4c8fe389fef (patch)
treea339e9dcaeb25acfc7493919f16e8eb890fd8891 /cpukit/score/include/rtems/score/thread.h
parentscore: Move default _ISR_Is_in_progress() (diff)
downloadrtems-bd67d7d2f8c9925517416b58196ca4c8fe389fef.tar.bz2
score: Simplify <rtems/score/thread.h>
Avoid Thread_Control typedef in <rtems/score/percpu.h>. This helps to get rid of the <rtems/score/percpu.h> include in <rtems/score/thread.h> which exposes a lot of implementation details.
Diffstat (limited to 'cpukit/score/include/rtems/score/thread.h')
-rw-r--r--cpukit/score/include/rtems/score/thread.h45
1 files changed, 9 insertions, 36 deletions
diff --git a/cpukit/score/include/rtems/score/thread.h b/cpukit/score/include/rtems/score/thread.h
index 05c1ff79b9..9d8382cf88 100644
--- a/cpukit/score/include/rtems/score/thread.h
+++ b/cpukit/score/include/rtems/score/thread.h
@@ -28,7 +28,6 @@
#endif
#include <rtems/score/isrlock.h>
#include <rtems/score/object.h>
-#include <rtems/score/percpu.h>
#include <rtems/score/priority.h>
#include <rtems/score/resource.h>
#include <rtems/score/stack.h>
@@ -40,6 +39,8 @@
#include <rtems/score/cpuset.h>
#endif
+struct Per_CPU_Control;
+
struct Scheduler_Control;
struct Scheduler_Node;
@@ -453,10 +454,10 @@ typedef struct Thread_Action Thread_Action;
* @param[in] level The ISR level for _Thread_Action_release_and_ISR_enable().
*/
typedef void ( *Thread_Action_handler )(
- Thread_Control *thread,
- Thread_Action *action,
- Per_CPU_Control *cpu,
- ISR_Level level
+ Thread_Control *thread,
+ Thread_Action *action,
+ struct Per_CPU_Control *cpu,
+ ISR_Level level
);
/**
@@ -611,14 +612,14 @@ typedef struct {
/**
* @brief The processor assigned by the current scheduler.
*/
- Per_CPU_Control *cpu;
+ struct Per_CPU_Control *cpu;
#if defined(RTEMS_DEBUG)
/**
* @brief The processor on which this thread executed the last time or is
* executing.
*/
- Per_CPU_Control *debug_real_cpu;
+ struct Per_CPU_Control *debug_real_cpu;
#endif
#endif
} Thread_Scheduler_control;
@@ -667,7 +668,7 @@ typedef struct {
/**
* This structure defines the Thread Control Block (TCB).
*/
-struct Thread_Control_struct {
+struct Thread_Control {
/** This field is the object management structure for each thread. */
Objects_Control Object;
/** This field is the current execution state of this thread. */
@@ -851,34 +852,6 @@ void rtems_iterate_over_all_threads(
);
/**
- * @brief Returns the thread control block of the executing thread.
- *
- * This function can be called in any context. On SMP configurations
- * interrupts are disabled to ensure that the processor index is used
- * consistently.
- *
- * @return The thread control block of the executing thread.
- */
-RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Get_executing( void )
-{
- Thread_Control *executing;
-
- #if defined( RTEMS_SMP )
- ISR_Level level;
-
- _ISR_Disable_without_giant( level );
- #endif
-
- executing = _Thread_Executing;
-
- #if defined( RTEMS_SMP )
- _ISR_Enable_without_giant( level );
- #endif
-
- return executing;
-}
-
-/**
* @brief Thread control add-on.
*/
typedef struct {