summaryrefslogtreecommitdiffstats
path: root/cpukit/score/src
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-24 15:14:48 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-07-26 11:55:44 +0200
commit5618c37a7a49b7ddde7bb6f7fda8c10616779c05 (patch)
treef6f711c7823171dd927104573528d61494ec3df6 /cpukit/score/src
parentscore: Create prioritybitmap implementation header (diff)
downloadrtems-5618c37a7a49b7ddde7bb6f7fda8c10616779c05.tar.bz2
score: Create thread implementation header
Move implementation specific parts of thread.h and thread.inl into new header file threadimpl.h. The thread.h contains now only the application visible API. Remove superfluous header file includes from various files.
Diffstat (limited to 'cpukit/score/src')
-rw-r--r--cpukit/score/src/corerwlocktimeout.c3
-rw-r--r--cpukit/score/src/heap.c1
-rw-r--r--cpukit/score/src/heapfree.c2
-rw-r--r--cpukit/score/src/mpci.c2
-rw-r--r--cpukit/score/src/objectgetnameasstring.c6
-rw-r--r--cpukit/score/src/objectidtoname.c3
-rw-r--r--cpukit/score/src/schedulercbs.c2
-rw-r--r--cpukit/score/src/schedulercbsattachthread.c6
-rw-r--r--cpukit/score/src/schedulercbsdetachthread.c5
-rw-r--r--cpukit/score/src/schedulercbsgetexecutiontime.c5
-rw-r--r--cpukit/score/src/schedulercbsgetremainingbudget.c5
-rw-r--r--cpukit/score/src/schedulercbsreleasejob.c4
-rw-r--r--cpukit/score/src/schedulercbsunblock.c1
-rw-r--r--cpukit/score/src/schedulerdefaulttick.c2
-rw-r--r--cpukit/score/src/scheduleredfblock.c6
-rw-r--r--cpukit/score/src/scheduleredfreleasejob.c4
-rw-r--r--cpukit/score/src/schedulerpriorityblock.c1
-rw-r--r--cpukit/score/src/schedulerpriorityyield.c1
-rw-r--r--cpukit/score/src/schedulersimpleblock.c9
-rw-r--r--cpukit/score/src/schedulersimpleyield.c1
-rw-r--r--cpukit/score/src/smp.c4
-rw-r--r--cpukit/score/src/thread.c23
-rw-r--r--cpukit/score/src/threadblockingoperationcancel.c3
-rw-r--r--cpukit/score/src/threadchangepriority.c2
-rw-r--r--cpukit/score/src/threadclearstate.c3
-rw-r--r--cpukit/score/src/threadclose.c4
-rw-r--r--cpukit/score/src/threadcreateidle.c13
-rw-r--r--cpukit/score/src/threaddelayended.c13
-rw-r--r--cpukit/score/src/threaddispatch.c20
-rw-r--r--cpukit/score/src/threadget.c12
-rw-r--r--cpukit/score/src/threadhandler.c16
-rw-r--r--cpukit/score/src/threadinitialize.c6
-rw-r--r--cpukit/score/src/threadloadenv.c12
-rw-r--r--cpukit/score/src/threadmp.c2
-rw-r--r--cpukit/score/src/threadqdequeuefifo.c10
-rw-r--r--cpukit/score/src/threadqdequeuepriority.c10
-rw-r--r--cpukit/score/src/threadqenqueue.c9
-rw-r--r--cpukit/score/src/threadqextractfifo.c10
-rw-r--r--cpukit/score/src/threadqextractpriority.c10
-rw-r--r--cpukit/score/src/threadqprocesstimeout.c8
-rw-r--r--cpukit/score/src/threadqtimeout.c9
-rw-r--r--cpukit/score/src/threadready.c4
-rw-r--r--cpukit/score/src/threadreset.c11
-rw-r--r--cpukit/score/src/threadrestart.c12
-rw-r--r--cpukit/score/src/threadsetpriority.c2
-rw-r--r--cpukit/score/src/threadsetstate.c4
-rw-r--r--cpukit/score/src/threadsettransient.c4
-rw-r--r--cpukit/score/src/threadstackallocate.c12
-rw-r--r--cpukit/score/src/threadstackfree.c12
-rw-r--r--cpukit/score/src/threadstart.c4
-rw-r--r--cpukit/score/src/threadstartmultitasking.c12
51 files changed, 71 insertions, 274 deletions
diff --git a/cpukit/score/src/corerwlocktimeout.c b/cpukit/score/src/corerwlocktimeout.c
index 1f5da2e046..1c3db0ef0b 100644
--- a/cpukit/score/src/corerwlocktimeout.c
+++ b/cpukit/score/src/corerwlocktimeout.c
@@ -18,9 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
#include <rtems/score/corerwlockimpl.h>
-#include <rtems/score/threaddispatch.h>
+#include <rtems/score/threadimpl.h>
void _CORE_RWLock_Timeout(
Objects_Id id,
diff --git a/cpukit/score/src/heap.c b/cpukit/score/src/heap.c
index 6773f2ac52..8312d419c1 100644
--- a/cpukit/score/src/heap.c
+++ b/cpukit/score/src/heap.c
@@ -22,6 +22,7 @@
#endif
#include <rtems/score/heapimpl.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/interr.h>
#include <string.h>
diff --git a/cpukit/score/src/heapfree.c b/cpukit/score/src/heapfree.c
index d15094ce77..8cf95182a3 100644
--- a/cpukit/score/src/heapfree.c
+++ b/cpukit/score/src/heapfree.c
@@ -19,8 +19,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
#include <rtems/score/heapimpl.h>
+#include <rtems/score/threadimpl.h>
#ifndef HEAP_PROTECTION
#define _Heap_Protection_determine_block_free( heap, block ) true
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index 9ba6106555..4cfdc85f7f 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -27,7 +27,7 @@
#include <rtems/score/cpu.h>
#include <rtems/score/interr.h>
#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/threadq.h>
#include <rtems/score/tqdata.h>
#include <rtems/score/watchdog.h>
diff --git a/cpukit/score/src/objectgetnameasstring.c b/cpukit/score/src/objectgetnameasstring.c
index 5e1ac0f57b..2e2c18ee6b 100644
--- a/cpukit/score/src/objectgetnameasstring.c
+++ b/cpukit/score/src/objectgetnameasstring.c
@@ -19,12 +19,10 @@
#include "config.h"
#endif
-#include <rtems/system.h>
#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <stdlib.h>
+#include <rtems/score/threadimpl.h>
+
#include <ctype.h>
-#include <inttypes.h>
/*
* This method objects the name of an object and returns its name
diff --git a/cpukit/score/src/objectidtoname.c b/cpukit/score/src/objectidtoname.c
index db739d8847..54e4228b28 100644
--- a/cpukit/score/src/objectidtoname.c
+++ b/cpukit/score/src/objectidtoname.c
@@ -18,9 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
Objects_Name_or_id_lookup_errors _Objects_Id_to_name (
Objects_Id id,
diff --git a/cpukit/score/src/schedulercbs.c b/cpukit/score/src/schedulercbs.c
index f3aa2c0261..a782d97c7a 100644
--- a/cpukit/score/src/schedulercbs.c
+++ b/cpukit/score/src/schedulercbs.c
@@ -19,7 +19,7 @@
#endif
#include <rtems/score/schedulercbs.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/wkspace.h>
Scheduler_CBS_Server **_Scheduler_CBS_Server_list;
diff --git a/cpukit/score/src/schedulercbsattachthread.c b/cpukit/score/src/schedulercbsattachthread.c
index 5192bc0779..1a0d6f1e7a 100644
--- a/cpukit/score/src/schedulercbsattachthread.c
+++ b/cpukit/score/src/schedulercbsattachthread.c
@@ -18,12 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
-#include <rtems/score/threaddispatch.h>
-#include <rtems/rtems/object.h>
+#include <rtems/score/threadimpl.h>
int _Scheduler_CBS_Attach_thread (
Scheduler_CBS_Server_id server_id,
diff --git a/cpukit/score/src/schedulercbsdetachthread.c b/cpukit/score/src/schedulercbsdetachthread.c
index cbc37eb195..b7b0d24aea 100644
--- a/cpukit/score/src/schedulercbsdetachthread.c
+++ b/cpukit/score/src/schedulercbsdetachthread.c
@@ -19,11 +19,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
-#include <rtems/score/threaddispatch.h>
+#include <rtems/score/threadimpl.h>
int _Scheduler_CBS_Detach_thread (
Scheduler_CBS_Server_id server_id,
diff --git a/cpukit/score/src/schedulercbsgetexecutiontime.c b/cpukit/score/src/schedulercbsgetexecutiontime.c
index e54cb44141..d4b18ae74c 100644
--- a/cpukit/score/src/schedulercbsgetexecutiontime.c
+++ b/cpukit/score/src/schedulercbsgetexecutiontime.c
@@ -19,11 +19,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
-#include <rtems/score/threaddispatch.h>
+#include <rtems/score/threadimpl.h>
int _Scheduler_CBS_Get_execution_time (
Scheduler_CBS_Server_id server_id,
diff --git a/cpukit/score/src/schedulercbsgetremainingbudget.c b/cpukit/score/src/schedulercbsgetremainingbudget.c
index 2ab0941c9f..c4713fcdf4 100644
--- a/cpukit/score/src/schedulercbsgetremainingbudget.c
+++ b/cpukit/score/src/schedulercbsgetremainingbudget.c
@@ -18,11 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
-#include <rtems/score/threaddispatch.h>
+#include <rtems/score/threadimpl.h>
int _Scheduler_CBS_Get_remaining_budget (
Scheduler_CBS_Server_id server_id,
diff --git a/cpukit/score/src/schedulercbsreleasejob.c b/cpukit/score/src/schedulercbsreleasejob.c
index 23453ed5c1..50cb9081bc 100644
--- a/cpukit/score/src/schedulercbsreleasejob.c
+++ b/cpukit/score/src/schedulercbsreleasejob.c
@@ -19,10 +19,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/schedulercbs.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/watchdogimpl.h>
void _Scheduler_CBS_Release_job(
diff --git a/cpukit/score/src/schedulercbsunblock.c b/cpukit/score/src/schedulercbsunblock.c
index 04e8a5c9a3..1e29c467ae 100644
--- a/cpukit/score/src/schedulercbsunblock.c
+++ b/cpukit/score/src/schedulercbsunblock.c
@@ -21,6 +21,7 @@
#include <rtems/score/schedulercbs.h>
#include <rtems/score/schedulerimpl.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/watchdogimpl.h>
void _Scheduler_CBS_Unblock(
diff --git a/cpukit/score/src/schedulerdefaulttick.c b/cpukit/score/src/schedulerdefaulttick.c
index 47844ed4be..a8a9f322cb 100644
--- a/cpukit/score/src/schedulerdefaulttick.c
+++ b/cpukit/score/src/schedulerdefaulttick.c
@@ -20,7 +20,7 @@
#endif
#include <rtems/score/schedulerimpl.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/smp.h>
static void _Scheduler_default_Tick_for_executing( Thread_Control *executing )
diff --git a/cpukit/score/src/scheduleredfblock.c b/cpukit/score/src/scheduleredfblock.c
index 1eb6c29931..4ad767d7bf 100644
--- a/cpukit/score/src/scheduleredfblock.c
+++ b/cpukit/score/src/scheduleredfblock.c
@@ -19,12 +19,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/context.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/scheduleredf.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
void _Scheduler_EDF_Block(
Thread_Control *the_thread
diff --git a/cpukit/score/src/scheduleredfreleasejob.c b/cpukit/score/src/scheduleredfreleasejob.c
index c43e71f04d..ec9a7d88b6 100644
--- a/cpukit/score/src/scheduleredfreleasejob.c
+++ b/cpukit/score/src/scheduleredfreleasejob.c
@@ -18,10 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/scheduler.h>
#include <rtems/score/scheduleredf.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/watchdogimpl.h>
void _Scheduler_EDF_Release_job(
diff --git a/cpukit/score/src/schedulerpriorityblock.c b/cpukit/score/src/schedulerpriorityblock.c
index d5f5840cba..9e48101f9e 100644
--- a/cpukit/score/src/schedulerpriorityblock.c
+++ b/cpukit/score/src/schedulerpriorityblock.c
@@ -21,6 +21,7 @@
#endif
#include <rtems/score/schedulerpriorityimpl.h>
+#include <rtems/score/threadimpl.h>
void _Scheduler_priority_Block(
Thread_Control *the_thread
diff --git a/cpukit/score/src/schedulerpriorityyield.c b/cpukit/score/src/schedulerpriorityyield.c
index e65bdb8af6..fa9a1f1271 100644
--- a/cpukit/score/src/schedulerpriorityyield.c
+++ b/cpukit/score/src/schedulerpriorityyield.c
@@ -20,6 +20,7 @@
#include <rtems/score/schedulerpriorityimpl.h>
#include <rtems/score/isr.h>
+#include <rtems/score/threadimpl.h>
void _Scheduler_priority_Yield( Thread_Control *thread )
{
diff --git a/cpukit/score/src/schedulersimpleblock.c b/cpukit/score/src/schedulersimpleblock.c
index 4287ddf2c6..b9753b5954 100644
--- a/cpukit/score/src/schedulersimpleblock.c
+++ b/cpukit/score/src/schedulersimpleblock.c
@@ -19,15 +19,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/thread.h>
#include <rtems/score/schedulersimple.h>
+#include <rtems/score/threadimpl.h>
void _Scheduler_simple_Block(
Thread_Control *the_thread
diff --git a/cpukit/score/src/schedulersimpleyield.c b/cpukit/score/src/schedulersimpleyield.c
index 05f803e791..cb8dc6fc92 100644
--- a/cpukit/score/src/schedulersimpleyield.c
+++ b/cpukit/score/src/schedulersimpleyield.c
@@ -20,6 +20,7 @@
#include <rtems/score/schedulersimpleimpl.h>
#include <rtems/score/isr.h>
+#include <rtems/score/threadimpl.h>
void _Scheduler_simple_Yield( Thread_Control *thread )
{
diff --git a/cpukit/score/src/smp.c b/cpukit/score/src/smp.c
index 4d2a1b52f8..ed32d86a92 100644
--- a/cpukit/score/src/smp.c
+++ b/cpukit/score/src/smp.c
@@ -18,11 +18,11 @@
#include "config.h"
#endif
-#include <rtems/system.h>
#include <rtems/bspsmp.h>
-#include <rtems/score/smp.h>
#include <rtems/score/thread.h>
#include <rtems/score/threaddispatch.h>
+#include <rtems/score/smp.h>
+#include <rtems/score/sysstate.h>
#if defined(RTEMS_DEBUG)
#include <rtems/bspIo.h>
diff --git a/cpukit/score/src/thread.c b/cpukit/score/src/thread.c
index 391ea52665..9d2301b156 100644
--- a/cpukit/score/src/thread.c
+++ b/cpukit/score/src/thread.c
@@ -18,26 +18,11 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/scheduler.h>
-#include <rtems/score/states.h>
#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/wkspace.h>
#include <rtems/config.h>
-#if defined(RTEMS_SMP)
- #include <rtems/bspsmp.h>
-#endif
-
void _Thread_Handler_initialization(void)
{
uint32_t ticks_per_timeslice =
@@ -83,11 +68,7 @@ void _Thread_Handler_initialization(void)
* per CPU in an SMP system. In addition, if this is a loosely
* coupled multiprocessing system, account for the MPCI Server Thread.
*/
- #if defined(RTEMS_SMP)
- maximum_internal_threads = rtems_configuration_get_maximum_processors();
- #else
- maximum_internal_threads = 1;
- #endif
+ maximum_internal_threads = rtems_configuration_get_maximum_processors();
#if defined(RTEMS_MULTIPROCESSING)
if ( _System_state_Is_multiprocessing )
diff --git a/cpukit/score/src/threadblockingoperationcancel.c b/cpukit/score/src/threadblockingoperationcancel.c
index 278dec51c8..70bdb3da18 100644
--- a/cpukit/score/src/threadblockingoperationcancel.c
+++ b/cpukit/score/src/threadblockingoperationcancel.c
@@ -18,8 +18,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
#if defined(RTEMS_DEBUG)
#include <rtems/score/interr.h>
#endif
diff --git a/cpukit/score/src/threadchangepriority.c b/cpukit/score/src/threadchangepriority.c
index 3d770d285d..b919ddd2d2 100644
--- a/cpukit/score/src/threadchangepriority.c
+++ b/cpukit/score/src/threadchangepriority.c
@@ -19,7 +19,7 @@
#include "config.h"
#endif
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/isr.h>
#include <rtems/score/schedulerimpl.h>
#include <rtems/score/threadq.h>
diff --git a/cpukit/score/src/threadclearstate.c b/cpukit/score/src/threadclearstate.c
index 0a02bdd48e..6afd04f8ce 100644
--- a/cpukit/score/src/threadclearstate.c
+++ b/cpukit/score/src/threadclearstate.c
@@ -18,9 +18,8 @@
#include "config.h"
#endif
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/schedulerimpl.h>
-#include <rtems/score/states.h>
void _Thread_Clear_state(
Thread_Control *the_thread,
diff --git a/cpukit/score/src/threadclose.c b/cpukit/score/src/threadclose.c
index da5f556084..9866a5c507 100644
--- a/cpukit/score/src/threadclose.c
+++ b/cpukit/score/src/threadclose.c
@@ -18,10 +18,8 @@
#include "config.h"
#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/object.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/schedulerimpl.h>
-#include <rtems/score/threaddispatch.h>
#include <rtems/score/threadq.h>
#include <rtems/score/userextimpl.h>
#include <rtems/score/watchdogimpl.h>
diff --git a/cpukit/score/src/threadcreateidle.c b/cpukit/score/src/threadcreateidle.c
index cef6d03886..181978bc81 100644
--- a/cpukit/score/src/threadcreateidle.c
+++ b/cpukit/score/src/threadcreateidle.c
@@ -18,19 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/smp.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/stackimpl.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/wkspace.h>
#include <rtems/config.h>
static void _Thread_Create_idle_for_cpu( Per_CPU_Control *per_cpu )
diff --git a/cpukit/score/src/threaddelayended.c b/cpukit/score/src/threaddelayended.c
index 98b2f03b2c..7505d3e07e 100644
--- a/cpukit/score/src/threaddelayended.c
+++ b/cpukit/score/src/threaddelayended.c
@@ -18,18 +18,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threaddispatch.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/wkspace.h>
+#include <rtems/score/threadimpl.h>
void _Thread_Delay_ended(
Objects_Id id,
diff --git a/cpukit/score/src/threaddispatch.c b/cpukit/score/src/threaddispatch.c
index 177a3d839d..b91eca8165 100644
--- a/cpukit/score/src/threaddispatch.c
+++ b/cpukit/score/src/threaddispatch.c
@@ -18,28 +18,14 @@
#include "config.h"
#endif
-#include <rtems/system.h>
+#include <rtems/score/threaddispatch.h>
#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threaddispatch.h>
-#include <rtems/score/threadq.h>
+#include <rtems/score/threadimpl.h>
+#include <rtems/score/tod.h>
#include <rtems/score/userextimpl.h>
#include <rtems/score/wkspace.h>
-#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
- #include <rtems/score/timestamp.h>
-#endif
-
-#if defined(RTEMS_SMP)
- #include <rtems/score/smp.h>
-#endif
-
void _Thread_Dispatch( void )
{
Thread_Control *executing;
diff --git a/cpukit/score/src/threadget.c b/cpukit/score/src/threadget.c
index a2b81b3e14..5bb76654b9 100644
--- a/cpukit/score/src/threadget.c
+++ b/cpukit/score/src/threadget.c
@@ -19,17 +19,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threaddispatch.h>
-#include <rtems/score/threadq.h>
+#include <rtems/score/threadimpl.h>
Thread_Control *_Thread_Get (
Objects_Id id,
diff --git a/cpukit/score/src/threadhandler.c b/cpukit/score/src/threadhandler.c
index fa57fc510b..1fde4cd4e5 100644
--- a/cpukit/score/src/threadhandler.c
+++ b/cpukit/score/src/threadhandler.c
@@ -18,22 +18,10 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threaddispatch.h>
-#include <rtems/score/threadq.h>
+#include <rtems/score/isrlevel.h>
#include <rtems/score/userextimpl.h>
-#include <rtems/score/wkspace.h>
-#if defined(RTEMS_SMP)
- #include <rtems/score/smp.h>
-#endif
/*
* Conditional magic to determine what style of C++ constructor
diff --git a/cpukit/score/src/threadinitialize.c b/cpukit/score/src/threadinitialize.c
index 2075293fd2..e9e8a0b112 100644
--- a/cpukit/score/src/threadinitialize.c
+++ b/cpukit/score/src/threadinitialize.c
@@ -17,16 +17,14 @@
#include "config.h"
#endif
-#include <rtems/score/thread.h>
-#include <rtems/config.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/schedulerimpl.h>
#include <rtems/score/stackimpl.h>
#include <rtems/score/threadq.h>
#include <rtems/score/userextimpl.h>
#include <rtems/score/watchdogimpl.h>
#include <rtems/score/wkspace.h>
+#include <rtems/config.h>
bool _Thread_Initialize(
Objects_Information *information,
diff --git a/cpukit/score/src/threadloadenv.c b/cpukit/score/src/threadloadenv.c
index b368b748b1..ad33626526 100644
--- a/cpukit/score/src/threadloadenv.c
+++ b/cpukit/score/src/threadloadenv.c
@@ -19,17 +19,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/wkspace.h>
+#include <rtems/score/threadimpl.h>
void _Thread_Load_environment(
Thread_Control *the_thread
diff --git a/cpukit/score/src/threadmp.c b/cpukit/score/src/threadmp.c
index 9b85873f7d..b33dad5284 100644
--- a/cpukit/score/src/threadmp.c
+++ b/cpukit/score/src/threadmp.c
@@ -20,7 +20,7 @@
#include <rtems/system.h>
#include <rtems/score/priority.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/mpci.h>
#include <rtems/score/wkspace.h>
#include <rtems/score/isr.h>
diff --git a/cpukit/score/src/threadqdequeuefifo.c b/cpukit/score/src/threadqdequeuefifo.c
index b00b58189f..717cb593ad 100644
--- a/cpukit/score/src/threadqdequeuefifo.c
+++ b/cpukit/score/src/threadqdequeuefifo.c
@@ -18,14 +18,10 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
+#include <rtems/score/chainimpl.h>
+#include <rtems/score/isrlevel.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/watchdogimpl.h>
Thread_Control *_Thread_queue_Dequeue_fifo(
diff --git a/cpukit/score/src/threadqdequeuepriority.c b/cpukit/score/src/threadqdequeuepriority.c
index 0162488a9e..49b4eae68e 100644
--- a/cpukit/score/src/threadqdequeuepriority.c
+++ b/cpukit/score/src/threadqdequeuepriority.c
@@ -18,14 +18,10 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
+#include <rtems/score/chainimpl.h>
+#include <rtems/score/isrlevel.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/watchdogimpl.h>
Thread_Control *_Thread_queue_Dequeue_priority(
diff --git a/cpukit/score/src/threadqenqueue.c b/cpukit/score/src/threadqenqueue.c
index 41cfd74080..a4f00188da 100644
--- a/cpukit/score/src/threadqenqueue.c
+++ b/cpukit/score/src/threadqenqueue.c
@@ -21,14 +21,9 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
+#include <rtems/score/isrlevel.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/watchdogimpl.h>
void _Thread_queue_Enqueue_with_handler(
diff --git a/cpukit/score/src/threadqextractfifo.c b/cpukit/score/src/threadqextractfifo.c
index a0d52af2ff..cd5df75dd7 100644
--- a/cpukit/score/src/threadqextractfifo.c
+++ b/cpukit/score/src/threadqextractfifo.c
@@ -19,14 +19,10 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
+#include <rtems/score/chainimpl.h>
+#include <rtems/score/isrlevel.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/watchdogimpl.h>
void _Thread_queue_Extract_fifo(
diff --git a/cpukit/score/src/threadqextractpriority.c b/cpukit/score/src/threadqextractpriority.c
index 29a1c645a8..c797d3bba3 100644
--- a/cpukit/score/src/threadqextractpriority.c
+++ b/cpukit/score/src/threadqextractpriority.c
@@ -18,14 +18,10 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
+#include <rtems/score/chainimpl.h>
+#include <rtems/score/isrlevel.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/watchdogimpl.h>
void _Thread_queue_Extract_priority_helper(
diff --git a/cpukit/score/src/threadqprocesstimeout.c b/cpukit/score/src/threadqprocesstimeout.c
index c596b959a4..ee15d49bb3 100644
--- a/cpukit/score/src/threadqprocesstimeout.c
+++ b/cpukit/score/src/threadqprocesstimeout.c
@@ -18,14 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
+#include <rtems/score/threadimpl.h>
void _Thread_queue_Process_timeout(
Thread_Control *the_thread
diff --git a/cpukit/score/src/threadqtimeout.c b/cpukit/score/src/threadqtimeout.c
index c310551f9e..07e8e4e8de 100644
--- a/cpukit/score/src/threadqtimeout.c
+++ b/cpukit/score/src/threadqtimeout.c
@@ -18,15 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/chain.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threaddispatch.h>
#include <rtems/score/threadq.h>
-#include <rtems/score/tqdata.h>
+#include <rtems/score/threadimpl.h>
void _Thread_queue_Timeout(
Objects_Id id,
diff --git a/cpukit/score/src/threadready.c b/cpukit/score/src/threadready.c
index d926a19fff..5bb925c4b5 100644
--- a/cpukit/score/src/threadready.c
+++ b/cpukit/score/src/threadready.c
@@ -18,8 +18,8 @@
#include "config.h"
#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/isr.h>
+#include <rtems/score/threadimpl.h>
+#include <rtems/score/isrlevel.h>
#include <rtems/score/schedulerimpl.h>
void _Thread_Ready(
diff --git a/cpukit/score/src/threadreset.c b/cpukit/score/src/threadreset.c
index fb4278de1b..a9527d1757 100644
--- a/cpukit/score/src/threadreset.c
+++ b/cpukit/score/src/threadreset.c
@@ -18,17 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/threadq.h>
-#include <rtems/score/wkspace.h>
#include <rtems/score/watchdogimpl.h>
void _Thread_Reset(
diff --git a/cpukit/score/src/threadrestart.c b/cpukit/score/src/threadrestart.c
index 26dd61aac2..24ad48a668 100644
--- a/cpukit/score/src/threadrestart.c
+++ b/cpukit/score/src/threadrestart.c
@@ -18,18 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/userextimpl.h>
-#include <rtems/score/wkspace.h>
bool _Thread_Restart(
Thread_Control *the_thread,
diff --git a/cpukit/score/src/threadsetpriority.c b/cpukit/score/src/threadsetpriority.c
index f776014779..d42627f2e8 100644
--- a/cpukit/score/src/threadsetpriority.c
+++ b/cpukit/score/src/threadsetpriority.c
@@ -18,7 +18,7 @@
#include "config.h"
#endif
-#include <rtems/score/thread.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/schedulerimpl.h>
void _Thread_Set_priority(
diff --git a/cpukit/score/src/threadsetstate.c b/cpukit/score/src/threadsetstate.c
index 0b25442a38..251275e150 100644
--- a/cpukit/score/src/threadsetstate.c
+++ b/cpukit/score/src/threadsetstate.c
@@ -21,8 +21,8 @@
#include "config.h"
#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/isr.h>
+#include <rtems/score/threadimpl.h>
+#include <rtems/score/isrlevel.h>
#include <rtems/score/schedulerimpl.h>
void _Thread_Set_state(
diff --git a/cpukit/score/src/threadsettransient.c b/cpukit/score/src/threadsettransient.c
index ecdbd71576..866bb6ef97 100644
--- a/cpukit/score/src/threadsettransient.c
+++ b/cpukit/score/src/threadsettransient.c
@@ -19,8 +19,8 @@
#include "config.h"
#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/isr.h>
+#include <rtems/score/threadimpl.h>
+#include <rtems/score/isrlevel.h>
#include <rtems/score/schedulerimpl.h>
void _Thread_Set_transient(
diff --git a/cpukit/score/src/threadstackallocate.c b/cpukit/score/src/threadstackallocate.c
index 5d9230efd0..bdabac90bf 100644
--- a/cpukit/score/src/threadstackallocate.c
+++ b/cpukit/score/src/threadstackallocate.c
@@ -19,18 +19,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/stackimpl.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/wkspace.h>
#include <rtems/config.h>
size_t _Thread_Stack_Allocate(
diff --git a/cpukit/score/src/threadstackfree.c b/cpukit/score/src/threadstackfree.c
index 0e59ef7915..d670e3d754 100644
--- a/cpukit/score/src/threadstackfree.c
+++ b/cpukit/score/src/threadstackfree.c
@@ -18,17 +18,7 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/wkspace.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/config.h>
void _Thread_Stack_Free(
diff --git a/cpukit/score/src/threadstart.c b/cpukit/score/src/threadstart.c
index 82f8a2a235..81c7b37bd0 100644
--- a/cpukit/score/src/threadstart.c
+++ b/cpukit/score/src/threadstart.c
@@ -19,8 +19,8 @@
#include "config.h"
#endif
-#include <rtems/score/thread.h>
-#include <rtems/score/isr.h>
+#include <rtems/score/threadimpl.h>
+#include <rtems/score/isrlevel.h>
#include <rtems/score/schedulerimpl.h>
#include <rtems/score/userextimpl.h>
diff --git a/cpukit/score/src/threadstartmultitasking.c b/cpukit/score/src/threadstartmultitasking.c
index 16d1328148..459d0d6f9b 100644
--- a/cpukit/score/src/threadstartmultitasking.c
+++ b/cpukit/score/src/threadstartmultitasking.c
@@ -18,18 +18,8 @@
#include "config.h"
#endif
-#include <rtems/system.h>
-#include <rtems/score/apiext.h>
-#include <rtems/score/context.h>
-#include <rtems/score/interr.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/object.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/states.h>
+#include <rtems/score/threadimpl.h>
#include <rtems/score/sysstate.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/wkspace.h>
void _Thread_Start_multitasking( void )
{