[rtems commit] score: Create states implementation header

Sebastian Huber sebh at rtems.org
Fri Jul 26 09:51:53 UTC 2013


Module:    rtems
Branch:    master
Commit:    fe6c170cf58c5e42a63010b5b4c985749cbc98a6
Changeset: http://git.rtems.org/rtems/commit/?id=fe6c170cf58c5e42a63010b5b4c985749cbc98a6

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Jul 24 16:19:52 2013 +0200

score: Create states implementation header

Move implementation specific parts of states.h and states.inl into new
header file statesimpl.h.  The states.h contains now only the
application visible API.

---

 cpukit/libfs/src/pipe/fifo.c                       |    1 +
 cpukit/libmisc/capture/capture.c                   |    2 +-
 cpukit/libmisc/monitor/mon-prmisc.c                |    2 +-
 cpukit/posix/src/barrierattrdestroy.c              |    1 -
 cpukit/posix/src/cond.c                            |    1 -
 cpukit/posix/src/condattrdestroy.c                 |    1 -
 cpukit/posix/src/condattrgetpshared.c              |    1 -
 cpukit/posix/src/condattrinit.c                    |    1 -
 cpukit/posix/src/condattrsetpshared.c              |    1 -
 cpukit/posix/src/condbroadcast.c                   |    1 -
 cpukit/posix/src/conddefaultattributes.c           |    1 -
 cpukit/posix/src/conddestroy.c                     |    1 -
 cpukit/posix/src/condget.c                         |    1 -
 cpukit/posix/src/condinit.c                        |    1 -
 cpukit/posix/src/condsignal.c                      |    1 -
 cpukit/posix/src/condsignalsupp.c                  |    1 -
 cpukit/posix/src/condtimedwait.c                   |    1 -
 cpukit/posix/src/condwait.c                        |    1 -
 cpukit/posix/src/condwaitsupp.c                    |    1 -
 cpukit/posix/src/killinfo.c                        |    4 +-
 cpukit/posix/src/psignal.c                         |   36 +++-----
 cpukit/posix/src/rwlockattrdestroy.c               |    1 -
 cpukit/rtems/include/rtems/rtems/tasks.h           |    1 -
 cpukit/rtems/src/barrierdelete.c                   |    1 -
 cpukit/rtems/src/eventmp.c                         |   12 +--
 cpukit/rtems/src/eventreceive.c                    |    1 +
 cpukit/rtems/src/msg.c                             |    1 -
 cpukit/rtems/src/msgmp.c                           |    1 +
 cpukit/rtems/src/msgqallocate.c                    |    1 -
 cpukit/rtems/src/msgqbroadcast.c                   |    1 -
 cpukit/rtems/src/msgqcreate.c                      |    1 -
 cpukit/rtems/src/msgqdelete.c                      |    1 -
 cpukit/rtems/src/msgqflush.c                       |    1 -
 cpukit/rtems/src/msgqgetnumberpending.c            |    1 -
 cpukit/rtems/src/msgqident.c                       |    1 -
 cpukit/rtems/src/msgqreceive.c                     |    1 -
 cpukit/rtems/src/msgqsend.c                        |    1 -
 cpukit/rtems/src/msgqtranslatereturncode.c         |    1 -
 cpukit/rtems/src/msgqurgent.c                      |    1 -
 cpukit/rtems/src/partmp.c                          |    1 +
 cpukit/rtems/src/region.c                          |    1 -
 cpukit/rtems/src/regioncreate.c                    |   10 +--
 cpukit/rtems/src/regiondelete.c                    |    1 -
 cpukit/rtems/src/regionextend.c                    |    1 -
 cpukit/rtems/src/regiongetfreeinfo.c               |    1 -
 cpukit/rtems/src/regiongetinfo.c                   |    1 -
 cpukit/rtems/src/regiongetsegment.c                |    1 -
 cpukit/rtems/src/regiongetsegmentsize.c            |    1 -
 cpukit/rtems/src/regionident.c                     |    1 -
 cpukit/rtems/src/regionmp.c                        |    1 +
 cpukit/rtems/src/regionprocessqueue.c              |    1 -
 cpukit/rtems/src/regionresizesegment.c             |    1 -
 cpukit/rtems/src/regionreturnsegment.c             |    1 -
 cpukit/rtems/src/sem.c                             |    1 -
 cpukit/rtems/src/semcreate.c                       |    1 -
 cpukit/rtems/src/semdelete.c                       |    1 -
 cpukit/rtems/src/semflush.c                        |    1 -
 cpukit/rtems/src/semident.c                        |    1 -
 cpukit/rtems/src/semobtain.c                       |    1 -
 cpukit/rtems/src/semrelease.c                      |    1 -
 cpukit/rtems/src/signalmp.c                        |    2 +-
 cpukit/rtems/src/systemeventreceive.c              |    1 +
 cpukit/rtems/src/taskident.c                       |    1 -
 cpukit/rtems/src/taskinitusers.c                   |    1 -
 cpukit/rtems/src/taskmp.c                          |    1 +
 cpukit/rtems/src/tasks.c                           |    1 -
 cpukit/score/Makefile.am                           |    2 +-
 cpukit/score/include/rtems/score/mpci.h            |    1 -
 cpukit/score/include/rtems/score/states.h          |   96 ++------------------
 .../rtems/score/statesimpl.h}                      |   97 ++++++++++++++++++-
 cpukit/score/include/rtems/score/threadimpl.h      |    1 +
 cpukit/score/preinstall.am                         |    8 +-
 cpukit/score/src/corebarrier.c                     |    3 +-
 cpukit/score/src/corebarrierrelease.c              |    1 -
 cpukit/score/src/corebarrierwait.c                 |    1 -
 cpukit/score/src/coremsg.c                         |    8 +-
 cpukit/score/src/coremsgbroadcast.c                |    1 -
 cpukit/score/src/coremsgclose.c                    |    1 -
 cpukit/score/src/coremsgflush.c                    |    1 -
 cpukit/score/src/coremsgflushsupp.c                |    1 -
 cpukit/score/src/coremsgflushwait.c                |    1 -
 cpukit/score/src/coremsginsert.c                   |    1 -
 cpukit/score/src/coremsgseize.c                    |    1 -
 cpukit/score/src/coremsgsubmit.c                   |    1 -
 cpukit/score/src/coremutex.c                       |    1 -
 cpukit/score/src/coremutexflush.c                  |    1 -
 cpukit/score/src/coremutexseize.c                  |    1 -
 cpukit/score/src/coremutexseizeintr.c              |    1 -
 cpukit/score/src/coremutexsurrender.c              |    1 -
 cpukit/score/src/corerwlock.c                      |    4 +-
 cpukit/score/src/corerwlockobtainread.c            |    1 -
 cpukit/score/src/corerwlockobtainwrite.c           |    1 -
 cpukit/score/src/corerwlockrelease.c               |    1 -
 cpukit/score/src/coresem.c                         |    5 +-
 cpukit/score/src/coresemflush.c                    |    1 -
 cpukit/score/src/coresemseize.c                    |    1 -
 cpukit/score/src/coresemsurrender.c                |    1 -
 cpukit/score/src/corespinlock.c                    |    1 -
 cpukit/score/src/corespinlockrelease.c             |    1 -
 cpukit/score/src/corespinlockwait.c                |    1 -
 cpukit/score/src/mpci.c                            |    1 -
 cpukit/score/src/threaddispatchdisablelevel.c      |    1 -
 cpukit/score/src/threadq.c                         |    1 -
 cpukit/score/src/threadqdequeue.c                  |    1 -
 cpukit/score/src/threadqenqueuefifo.c              |    1 -
 cpukit/score/src/threadqenqueuepriority.c          |    9 +--
 cpukit/score/src/threadqextract.c                  |    1 -
 cpukit/score/src/threadqextractwithproxy.c         |    8 +--
 cpukit/score/src/threadqfirst.c                    |    1 -
 cpukit/score/src/threadqfirstfifo.c                |    1 -
 cpukit/score/src/threadqfirstpriority.c            |    1 -
 cpukit/score/src/threadqflush.c                    |    1 -
 cpukit/score/src/threadqrequeue.c                  |    8 +--
 113 files changed, 144 insertions(+), 267 deletions(-)

diff --git a/cpukit/libfs/src/pipe/fifo.c b/cpukit/libfs/src/pipe/fifo.c
index f4e801b..eef360c 100644
--- a/cpukit/libfs/src/pipe/fifo.c
+++ b/cpukit/libfs/src/pipe/fifo.c
@@ -29,6 +29,7 @@
 #include <rtems.h>
 #include <rtems/libio_.h>
 #include <rtems/rtems/barrierimpl.h>
+#include <rtems/score/statesimpl.h>
 
 #include "pipe.h"
 
diff --git a/cpukit/libmisc/capture/capture.c b/cpukit/libmisc/capture/capture.c
index 1acfc0d..050a92c 100644
--- a/cpukit/libmisc/capture/capture.c
+++ b/cpukit/libmisc/capture/capture.c
@@ -29,7 +29,7 @@
 #include <string.h>
 
 #include "capture.h"
-#include <rtems/score/states.inl>
+#include <rtems/score/statesimpl.h>
 
 /*
  * These events are always recorded and are not part of the
diff --git a/cpukit/libmisc/monitor/mon-prmisc.c b/cpukit/libmisc/monitor/mon-prmisc.c
index e01d486..d9e1c4d 100644
--- a/cpukit/libmisc/monitor/mon-prmisc.c
+++ b/cpukit/libmisc/monitor/mon-prmisc.c
@@ -11,8 +11,8 @@
 
 #include <rtems.h>
 #include <rtems/monitor.h>
-
 #include <rtems/assoc.h>
+#include <rtems/score/statesimpl.h>
 
 #include <stdio.h>
 #include <ctype.h>
diff --git a/cpukit/posix/src/barrierattrdestroy.c b/cpukit/posix/src/barrierattrdestroy.c
index 76dca52..6fe52f4 100644
--- a/cpukit/posix/src/barrierattrdestroy.c
+++ b/cpukit/posix/src/barrierattrdestroy.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/cond.c b/cpukit/posix/src/cond.c
index f35cfe1..c7b91fb 100644
--- a/cpukit/posix/src/cond.c
+++ b/cpukit/posix/src/cond.c
@@ -25,7 +25,6 @@
 #include <rtems/system.h>
 #include <rtems/config.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condattrdestroy.c b/cpukit/posix/src/condattrdestroy.c
index 485fb69..a8f1c63 100644
--- a/cpukit/posix/src/condattrdestroy.c
+++ b/cpukit/posix/src/condattrdestroy.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condattrgetpshared.c b/cpukit/posix/src/condattrgetpshared.c
index 5b7bcb0..42e0121 100644
--- a/cpukit/posix/src/condattrgetpshared.c
+++ b/cpukit/posix/src/condattrgetpshared.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condattrinit.c b/cpukit/posix/src/condattrinit.c
index 188ec76..4007e3a 100644
--- a/cpukit/posix/src/condattrinit.c
+++ b/cpukit/posix/src/condattrinit.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condattrsetpshared.c b/cpukit/posix/src/condattrsetpshared.c
index 4aceb49..d3b3564 100644
--- a/cpukit/posix/src/condattrsetpshared.c
+++ b/cpukit/posix/src/condattrsetpshared.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condbroadcast.c b/cpukit/posix/src/condbroadcast.c
index 207c07a..14e78e7 100644
--- a/cpukit/posix/src/condbroadcast.c
+++ b/cpukit/posix/src/condbroadcast.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/conddefaultattributes.c b/cpukit/posix/src/conddefaultattributes.c
index 2f9bae3..aec90f2 100644
--- a/cpukit/posix/src/conddefaultattributes.c
+++ b/cpukit/posix/src/conddefaultattributes.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/conddestroy.c b/cpukit/posix/src/conddestroy.c
index eff5ba0..91388fa 100644
--- a/cpukit/posix/src/conddestroy.c
+++ b/cpukit/posix/src/conddestroy.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condget.c b/cpukit/posix/src/condget.c
index 32bfa07..4f3bc14 100644
--- a/cpukit/posix/src/condget.c
+++ b/cpukit/posix/src/condget.c
@@ -16,7 +16,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c
index ac77bdd..2c6bd8d 100644
--- a/cpukit/posix/src/condinit.c
+++ b/cpukit/posix/src/condinit.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condsignal.c b/cpukit/posix/src/condsignal.c
index 0283fe4..2f2c9b7 100644
--- a/cpukit/posix/src/condsignal.c
+++ b/cpukit/posix/src/condsignal.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condsignalsupp.c b/cpukit/posix/src/condsignalsupp.c
index 5b29a08..0261b04 100644
--- a/cpukit/posix/src/condsignalsupp.c
+++ b/cpukit/posix/src/condsignalsupp.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condtimedwait.c b/cpukit/posix/src/condtimedwait.c
index 787fd08..4328615 100644
--- a/cpukit/posix/src/condtimedwait.c
+++ b/cpukit/posix/src/condtimedwait.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condwait.c b/cpukit/posix/src/condwait.c
index 2120e39..cbd6d95 100644
--- a/cpukit/posix/src/condwait.c
+++ b/cpukit/posix/src/condwait.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c
index 0da3a67..cbc21c3 100644
--- a/cpukit/posix/src/condwaitsupp.c
+++ b/cpukit/posix/src/condwaitsupp.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
index 98fbf1e..b2dc75b 100644
--- a/cpukit/posix/src/killinfo.c
+++ b/cpukit/posix/src/killinfo.c
@@ -24,11 +24,11 @@
 #include <signal.h>
 #include <errno.h>
 
-#include <rtems/system.h>
 #include <rtems/posix/pthreadimpl.h>
 #include <rtems/posix/psignalimpl.h>
-#include <rtems/seterr.h>
 #include <rtems/score/isr.h>
+#include <rtems/score/statesimpl.h>
+#include <rtems/seterr.h>
 
 /*
  *  If you enable this, then you get printk() feedback on each path
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
index fc9400d..62c746d 100644
--- a/cpukit/posix/src/psignal.c
+++ b/cpukit/posix/src/psignal.c
@@ -18,28 +18,30 @@
 #include "config.h"
 #endif
 
-#if defined(RTEMS_DEBUG)
-  #include <assert.h>
-#endif
 #include <errno.h>
-#include <pthread.h>
 #include <signal.h>
-#include <string.h>	/* memcpy */
-#include <stdlib.h>	/* exit */
+#include <string.h>
+#include <stdlib.h>
 
-#include <rtems/system.h>
-#include <rtems/config.h>
-#include <rtems/score/isr.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/isrlevel.h>
+#include <rtems/score/statesimpl.h>
 #include <rtems/score/threadq.h>
 #include <rtems/score/watchdogimpl.h>
 #include <rtems/score/wkspace.h>
-#include <rtems/seterr.h>
 #include <rtems/posix/threadsup.h>
 #include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthreadimpl.h>
 #include <rtems/posix/time.h>
-#include <stdio.h>
+#include <rtems/config.h>
+#include <rtems/seterr.h>
+
+/*
+ *  Ensure we have the same number of vectors and default vector entries
+ */
+RTEMS_STATIC_ASSERT(
+  sizeof( _POSIX_signals_Vectors ) == sizeof( _POSIX_signals_Default_vectors ),
+  posix_signals_vectors
+);
 
 /*** PROCESS WIDE STUFF ****/
 
@@ -176,16 +178,6 @@ void _POSIX_signals_Manager_Initialization(void)
 
   maximum_queued_signals = Configuration_POSIX_API.maximum_queued_signals;
 
-  /*
-   *  Ensure we have the same number of vectors and default vector entries
-   */
-
-  #if defined(RTEMS_DEBUG)
-    assert(
-     sizeof(_POSIX_signals_Vectors) == sizeof(_POSIX_signals_Default_vectors)
-    );
-  #endif
-
   memcpy(
     _POSIX_signals_Vectors,
     _POSIX_signals_Default_vectors,
diff --git a/cpukit/posix/src/rwlockattrdestroy.c b/cpukit/posix/src/rwlockattrdestroy.c
index a8f719e..5b18f0e 100644
--- a/cpukit/posix/src/rwlockattrdestroy.c
+++ b/cpukit/posix/src/rwlockattrdestroy.c
@@ -23,7 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/posix/condimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/rtems/include/rtems/rtems/tasks.h b/cpukit/rtems/include/rtems/rtems/tasks.h
index c5d20c8..2030632 100644
--- a/cpukit/rtems/include/rtems/rtems/tasks.h
+++ b/cpukit/rtems/include/rtems/rtems/tasks.h
@@ -40,7 +40,6 @@
 #define _RTEMS_RTEMS_TASKS_H
 
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/rtems/types.h>
 #include <rtems/rtems/event.h>
diff --git a/cpukit/rtems/src/barrierdelete.c b/cpukit/rtems/src/barrierdelete.c
index 83ed480..8e958c3 100644
--- a/cpukit/rtems/src/barrierdelete.c
+++ b/cpukit/rtems/src/barrierdelete.c
@@ -22,7 +22,6 @@
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/support.h>
 #include <rtems/rtems/barrierimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/rtems/src/eventmp.c b/cpukit/rtems/src/eventmp.c
index d4c890b..ae29c3a 100644
--- a/cpukit/rtems/src/eventmp.c
+++ b/cpukit/rtems/src/eventmp.c
@@ -18,16 +18,8 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/rtems/event.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/support.h>
+#include <rtems/rtems/eventimpl.h>
+#include <rtems/score/statesimpl.h>
 
 RTEMS_STATIC_ASSERT(
   sizeof(Event_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
diff --git a/cpukit/rtems/src/eventreceive.c b/cpukit/rtems/src/eventreceive.c
index d7a21c3..3a1de16 100644
--- a/cpukit/rtems/src/eventreceive.c
+++ b/cpukit/rtems/src/eventreceive.c
@@ -20,6 +20,7 @@
 
 #include <rtems/rtems/eventimpl.h>
 #include <rtems/rtems/tasks.h>
+#include <rtems/score/statesimpl.h>
 
 rtems_status_code rtems_event_receive(
   rtems_event_set  event_in,
diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c
index fd29225..491122f 100644
--- a/cpukit/rtems/src/msg.c
+++ b/cpukit/rtems/src/msg.c
@@ -24,7 +24,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgmp.c b/cpukit/rtems/src/msgmp.c
index d516251..f045b69 100644
--- a/cpukit/rtems/src/msgmp.c
+++ b/cpukit/rtems/src/msgmp.c
@@ -28,6 +28,7 @@
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/rtems/support.h>
+#include <rtems/score/statesimpl.h>
 #include <rtems/score/threadimpl.h>
 
 RTEMS_STATIC_ASSERT(
diff --git a/cpukit/rtems/src/msgqallocate.c b/cpukit/rtems/src/msgqallocate.c
index af61def..7d85c77 100644
--- a/cpukit/rtems/src/msgqallocate.c
+++ b/cpukit/rtems/src/msgqallocate.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgqbroadcast.c b/cpukit/rtems/src/msgqbroadcast.c
index c8cf757..f02af25 100644
--- a/cpukit/rtems/src/msgqbroadcast.c
+++ b/cpukit/rtems/src/msgqbroadcast.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgqcreate.c b/cpukit/rtems/src/msgqcreate.c
index b3f6bb5..67d82ed 100644
--- a/cpukit/rtems/src/msgqcreate.c
+++ b/cpukit/rtems/src/msgqcreate.c
@@ -24,7 +24,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgqdelete.c b/cpukit/rtems/src/msgqdelete.c
index 2131530..c133ac1 100644
--- a/cpukit/rtems/src/msgqdelete.c
+++ b/cpukit/rtems/src/msgqdelete.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgqflush.c b/cpukit/rtems/src/msgqflush.c
index 9305b9b..9c70196 100644
--- a/cpukit/rtems/src/msgqflush.c
+++ b/cpukit/rtems/src/msgqflush.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgqgetnumberpending.c b/cpukit/rtems/src/msgqgetnumberpending.c
index 6c4ff62..3dd1b9d 100644
--- a/cpukit/rtems/src/msgqgetnumberpending.c
+++ b/cpukit/rtems/src/msgqgetnumberpending.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgqident.c b/cpukit/rtems/src/msgqident.c
index 6271a84..2dc5e22 100644
--- a/cpukit/rtems/src/msgqident.c
+++ b/cpukit/rtems/src/msgqident.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgqreceive.c b/cpukit/rtems/src/msgqreceive.c
index d8df301..8518899 100644
--- a/cpukit/rtems/src/msgqreceive.c
+++ b/cpukit/rtems/src/msgqreceive.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgqsend.c b/cpukit/rtems/src/msgqsend.c
index aeeb0fc..4a251b9 100644
--- a/cpukit/rtems/src/msgqsend.c
+++ b/cpukit/rtems/src/msgqsend.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgqtranslatereturncode.c b/cpukit/rtems/src/msgqtranslatereturncode.c
index aeedff7..1567063 100644
--- a/cpukit/rtems/src/msgqtranslatereturncode.c
+++ b/cpukit/rtems/src/msgqtranslatereturncode.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/threadimpl.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/msgqurgent.c b/cpukit/rtems/src/msgqurgent.c
index ae444e4..f16c0bb 100644
--- a/cpukit/rtems/src/msgqurgent.c
+++ b/cpukit/rtems/src/msgqurgent.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremsgimpl.h>
 #include <rtems/score/object.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/partmp.c b/cpukit/rtems/src/partmp.c
index ea88026..a3b2d21 100644
--- a/cpukit/rtems/src/partmp.c
+++ b/cpukit/rtems/src/partmp.c
@@ -27,6 +27,7 @@
 #include <rtems/rtems/partimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/rtems/support.h>
+#include <rtems/score/statesimpl.h>
 #include <rtems/score/threadimpl.h>
 
 RTEMS_STATIC_ASSERT(
diff --git a/cpukit/rtems/src/region.c b/cpukit/rtems/src/region.c
index 66cb3c4..1b151bd 100644
--- a/cpukit/rtems/src/region.c
+++ b/cpukit/rtems/src/region.c
@@ -25,7 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/apimutex.h>
 
diff --git a/cpukit/rtems/src/regioncreate.c b/cpukit/rtems/src/regioncreate.c
index 163ba99..b12647d 100644
--- a/cpukit/rtems/src/regioncreate.c
+++ b/cpukit/rtems/src/regioncreate.c
@@ -18,16 +18,12 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
+#include <rtems/rtems/regionimpl.h>
 #include <rtems/rtems/attrimpl.h>
-#include <rtems/rtems/status.h>
 #include <rtems/rtems/support.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
 #include <rtems/score/apimutex.h>
+#include <rtems/score/statesimpl.h>
+#include <rtems/score/threadq.h>
 
 /*
  *  rtems_region_create
diff --git a/cpukit/rtems/src/regiondelete.c b/cpukit/rtems/src/regiondelete.c
index c057545..e65600e 100644
--- a/cpukit/rtems/src/regiondelete.c
+++ b/cpukit/rtems/src/regiondelete.c
@@ -24,7 +24,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/apimutex.h>
 
diff --git a/cpukit/rtems/src/regionextend.c b/cpukit/rtems/src/regionextend.c
index 1c31ea2..c857eb6 100644
--- a/cpukit/rtems/src/regionextend.c
+++ b/cpukit/rtems/src/regionextend.c
@@ -24,7 +24,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/apimutex.h>
 
diff --git a/cpukit/rtems/src/regiongetfreeinfo.c b/cpukit/rtems/src/regiongetfreeinfo.c
index 830a888..1052b38 100644
--- a/cpukit/rtems/src/regiongetfreeinfo.c
+++ b/cpukit/rtems/src/regiongetfreeinfo.c
@@ -24,7 +24,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/apimutex.h>
 #include <rtems/score/thread.h>
 
diff --git a/cpukit/rtems/src/regiongetinfo.c b/cpukit/rtems/src/regiongetinfo.c
index 0b60f9d..1cb6f92 100644
--- a/cpukit/rtems/src/regiongetinfo.c
+++ b/cpukit/rtems/src/regiongetinfo.c
@@ -24,7 +24,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/apimutex.h>
 #include <rtems/score/thread.h>
 
diff --git a/cpukit/rtems/src/regiongetsegment.c b/cpukit/rtems/src/regiongetsegment.c
index aac68bd..6622219 100644
--- a/cpukit/rtems/src/regiongetsegment.c
+++ b/cpukit/rtems/src/regiongetsegment.c
@@ -24,7 +24,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/optionsimpl.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/apimutex.h>
 
diff --git a/cpukit/rtems/src/regiongetsegmentsize.c b/cpukit/rtems/src/regiongetsegmentsize.c
index 9dd793f..65c1580 100644
--- a/cpukit/rtems/src/regiongetsegmentsize.c
+++ b/cpukit/rtems/src/regiongetsegmentsize.c
@@ -24,7 +24,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/apimutex.h>
 
 rtems_status_code rtems_region_get_segment_size(
diff --git a/cpukit/rtems/src/regionident.c b/cpukit/rtems/src/regionident.c
index 6ab8719..4a64b93 100644
--- a/cpukit/rtems/src/regionident.c
+++ b/cpukit/rtems/src/regionident.c
@@ -24,7 +24,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/apimutex.h>
 
diff --git a/cpukit/rtems/src/regionmp.c b/cpukit/rtems/src/regionmp.c
index f0dc4d8..41b52fa 100644
--- a/cpukit/rtems/src/regionmp.c
+++ b/cpukit/rtems/src/regionmp.c
@@ -27,6 +27,7 @@
 #include <rtems/rtems/regionimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/rtems/support.h>
+#include <rtems/score/statesimpl.h>
 #include <rtems/score/threadimpl.h>
 
 RTEMS_STATIC_ASSERT(
diff --git a/cpukit/rtems/src/regionprocessqueue.c b/cpukit/rtems/src/regionprocessqueue.c
index bd6b2f0..f2c11df 100644
--- a/cpukit/rtems/src/regionprocessqueue.c
+++ b/cpukit/rtems/src/regionprocessqueue.c
@@ -24,7 +24,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/apimutex.h>
 
diff --git a/cpukit/rtems/src/regionresizesegment.c b/cpukit/rtems/src/regionresizesegment.c
index 20fea98..fed8333 100644
--- a/cpukit/rtems/src/regionresizesegment.c
+++ b/cpukit/rtems/src/regionresizesegment.c
@@ -24,7 +24,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/apimutex.h>
 
diff --git a/cpukit/rtems/src/regionreturnsegment.c b/cpukit/rtems/src/regionreturnsegment.c
index 46fda06..4a50bd2 100644
--- a/cpukit/rtems/src/regionreturnsegment.c
+++ b/cpukit/rtems/src/regionreturnsegment.c
@@ -32,7 +32,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/apimutex.h>
 
diff --git a/cpukit/rtems/src/sem.c b/cpukit/rtems/src/sem.c
index c7fe325..40bec8d 100644
--- a/cpukit/rtems/src/sem.c
+++ b/cpukit/rtems/src/sem.c
@@ -29,7 +29,6 @@
 #include <rtems/rtems/semimpl.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/semcreate.c b/cpukit/rtems/src/semcreate.c
index 697e004..8afb1b6 100644
--- a/cpukit/rtems/src/semcreate.c
+++ b/cpukit/rtems/src/semcreate.c
@@ -28,7 +28,6 @@
 #include <rtems/rtems/semimpl.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/semdelete.c b/cpukit/rtems/src/semdelete.c
index 4d54b4c..5ae516d 100644
--- a/cpukit/rtems/src/semdelete.c
+++ b/cpukit/rtems/src/semdelete.c
@@ -28,7 +28,6 @@
 #include <rtems/rtems/semimpl.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/semflush.c b/cpukit/rtems/src/semflush.c
index a52cf02..93aac39 100644
--- a/cpukit/rtems/src/semflush.c
+++ b/cpukit/rtems/src/semflush.c
@@ -28,7 +28,6 @@
 #include <rtems/rtems/semimpl.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/semident.c b/cpukit/rtems/src/semident.c
index 41d24c4..a7b383b 100644
--- a/cpukit/rtems/src/semident.c
+++ b/cpukit/rtems/src/semident.c
@@ -28,7 +28,6 @@
 #include <rtems/rtems/semimpl.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/semobtain.c b/cpukit/rtems/src/semobtain.c
index 04e38d4..ca7735f 100644
--- a/cpukit/rtems/src/semobtain.c
+++ b/cpukit/rtems/src/semobtain.c
@@ -28,7 +28,6 @@
 #include <rtems/rtems/semimpl.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/semrelease.c b/cpukit/rtems/src/semrelease.c
index f2bbd84..e0f148c 100644
--- a/cpukit/rtems/src/semrelease.c
+++ b/cpukit/rtems/src/semrelease.c
@@ -43,7 +43,6 @@
 #include <rtems/rtems/semimpl.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 #if defined(RTEMS_MULTIPROCESSING)
diff --git a/cpukit/rtems/src/signalmp.c b/cpukit/rtems/src/signalmp.c
index 29054cd..ec778ac 100644
--- a/cpukit/rtems/src/signalmp.c
+++ b/cpukit/rtems/src/signalmp.c
@@ -25,10 +25,10 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/options.h>
 #include <rtems/rtems/signal.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/rtems/support.h>
+#include <rtems/score/statesimpl.h>
 #include <rtems/score/threadimpl.h>
 
 RTEMS_STATIC_ASSERT(
diff --git a/cpukit/rtems/src/systemeventreceive.c b/cpukit/rtems/src/systemeventreceive.c
index 7e78cff..7e44864 100644
--- a/cpukit/rtems/src/systemeventreceive.c
+++ b/cpukit/rtems/src/systemeventreceive.c
@@ -26,6 +26,7 @@
 
 #include <rtems/rtems/eventimpl.h>
 #include <rtems/rtems/tasks.h>
+#include <rtems/score/statesimpl.h>
 
 rtems_status_code rtems_event_system_receive(
   rtems_event_set  event_in,
diff --git a/cpukit/rtems/src/taskident.c b/cpukit/rtems/src/taskident.c
index 1581e09..a63251c 100644
--- a/cpukit/rtems/src/taskident.c
+++ b/cpukit/rtems/src/taskident.c
@@ -24,7 +24,6 @@
 #include <rtems/rtems/modes.h>
 #include <rtems/score/object.h>
 #include <rtems/score/stack.h>
-#include <rtems/score/states.h>
 #include <rtems/rtems/tasksimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
diff --git a/cpukit/rtems/src/taskinitusers.c b/cpukit/rtems/src/taskinitusers.c
index 0801d37..3b498f4 100644
--- a/cpukit/rtems/src/taskinitusers.c
+++ b/cpukit/rtems/src/taskinitusers.c
@@ -26,7 +26,6 @@
 #include <rtems/score/object.h>
 #include <rtems/rtems/rtemsapi.h>
 #include <rtems/score/stack.h>
-#include <rtems/score/states.h>
 #include <rtems/rtems/tasksimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
diff --git a/cpukit/rtems/src/taskmp.c b/cpukit/rtems/src/taskmp.c
index 2dec74a..4323f4e 100644
--- a/cpukit/rtems/src/taskmp.c
+++ b/cpukit/rtems/src/taskmp.c
@@ -28,6 +28,7 @@
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdog.h>
 #include <rtems/rtems/support.h>
+#include <rtems/score/statesimpl.h>
 #include <rtems/score/threadimpl.h>
 
 RTEMS_STATIC_ASSERT(
diff --git a/cpukit/rtems/src/tasks.c b/cpukit/rtems/src/tasks.c
index 15f7660..49d0ad4 100644
--- a/cpukit/rtems/src/tasks.c
+++ b/cpukit/rtems/src/tasks.c
@@ -27,7 +27,6 @@
 #include <rtems/rtems/modes.h>
 #include <rtems/score/object.h>
 #include <rtems/score/stack.h>
-#include <rtems/score/states.h>
 #include <rtems/rtems/tasksimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index 5b33078..be493da 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -56,6 +56,7 @@ include_rtems_score_HEADERS += include/rtems/score/smplock.h
 include_rtems_score_HEADERS += include/rtems/score/stack.h
 include_rtems_score_HEADERS += include/rtems/score/stackimpl.h
 include_rtems_score_HEADERS += include/rtems/score/states.h
+include_rtems_score_HEADERS += include/rtems/score/statesimpl.h
 include_rtems_score_HEADERS += include/rtems/score/sysstate.h
 include_rtems_score_HEADERS += include/rtems/score/thread.h
 include_rtems_score_HEADERS += include/rtems/score/threadimpl.h
@@ -100,7 +101,6 @@ endif
 
 ## inline
 include_rtems_score_HEADERS += inline/rtems/score/object.inl
-include_rtems_score_HEADERS += inline/rtems/score/states.inl
 include_rtems_score_HEADERS += inline/rtems/score/threadq.inl
 include_rtems_score_HEADERS += inline/rtems/score/tod.inl
 include_rtems_score_HEADERS += inline/rtems/score/tqdata.inl
diff --git a/cpukit/score/include/rtems/score/mpci.h b/cpukit/score/include/rtems/score/mpci.h
index 16f6d36..0932c47 100644
--- a/cpukit/score/include/rtems/score/mpci.h
+++ b/cpukit/score/include/rtems/score/mpci.h
@@ -37,7 +37,6 @@ extern "C" {
 #endif
 
 #include <rtems/score/mppkt.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 #include <rtems/score/tqdata.h>
diff --git a/cpukit/score/include/rtems/score/states.h b/cpukit/score/include/rtems/score/states.h
index 9fab5d4..89db185 100644
--- a/cpukit/score/include/rtems/score/states.h
+++ b/cpukit/score/include/rtems/score/states.h
@@ -18,6 +18,12 @@
 #ifndef _RTEMS_SCORE_STATES_H
 #define _RTEMS_SCORE_STATES_H
 
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  *  @defgroup ScoreStates SuperCore Thread States
  *
@@ -28,105 +34,17 @@
  */
 /**@{*/
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
 /**
  *  The following type defines the control block used to manage a
  *  thread's state.
  */
 typedef uint32_t   States_Control;
 
-/*
- *  The following constants define the individual states which may be
- *  be used to compose and manipulate a thread's state.
- */
-
-/** This macro corresponds to all states being set. */
-#define STATES_ALL_SET                         0xfffff
-/** This macro corresponds to a task being ready. */
-#define STATES_READY                           0x00000
-/** This macro corresponds to a task being created but not yet started. */
-#define STATES_DORMANT                         0x00001
-/** This macro corresponds to a task being suspended. */
-#define STATES_SUSPENDED                       0x00002
-/** This macro corresponds to a task being in an internal state transition. */
-#define STATES_TRANSIENT                       0x00004
-/** This macro corresponds to a task which is waiting for a timeout. */
-#define STATES_DELAYING                        0x00008
-/** This macro corresponds to a task waiting until a specific TOD. */
-#define STATES_WAITING_FOR_TIME                0x00010
-/** This macro corresponds to a task waiting for a variable length buffer. */
-#define STATES_WAITING_FOR_BUFFER              0x00020
-/** This macro corresponds to a task waiting for a fixed size segment. */
-#define STATES_WAITING_FOR_SEGMENT             0x00040
-/** This macro corresponds to a task waiting for a message. */
-#define STATES_WAITING_FOR_MESSAGE             0x00080
-/** This macro corresponds to a task waiting for an event. */
-#define STATES_WAITING_FOR_EVENT               0x00100
-/** This macro corresponds to a task waiting for a semaphore. */
-#define STATES_WAITING_FOR_SEMAPHORE           0x00200
-/** This macro corresponds to a task waiting for a mutex. */
-#define STATES_WAITING_FOR_MUTEX               0x00400
-/** This macro corresponds to a task waiting for a condition variable. */
-#define STATES_WAITING_FOR_CONDITION_VARIABLE  0x00800
-/** This macro corresponds to a task waiting for a join while exiting. */
-#define STATES_WAITING_FOR_JOIN_AT_EXIT        0x01000
-/** This macro corresponds to a task waiting for a reply to an MPCI request. */
-#define STATES_WAITING_FOR_RPC_REPLY           0x02000
-/** This macro corresponds to a task waiting for a period. */
-#define STATES_WAITING_FOR_PERIOD              0x04000
-/** This macro corresponds to a task waiting for a signal. */
-#define STATES_WAITING_FOR_SIGNAL              0x08000
-/** This macro corresponds to a task waiting for a barrier. */
-#define STATES_WAITING_FOR_BARRIER             0x10000
-/** This macro corresponds to a task waiting for a RWLock. */
-#define STATES_WAITING_FOR_RWLOCK              0x20000
-/** This macro corresponds to a task waiting for a system event. */
-#define STATES_WAITING_FOR_SYSTEM_EVENT        0x40000
-
-/** This macro corresponds to a task which is in an interruptible
- *  blocking state.
- */
-#define STATES_INTERRUPTIBLE_BY_SIGNAL         0x10000000
-
-/** This macro corresponds to a task waiting for a local object operation. */
-#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER             | \
-                                 STATES_WAITING_FOR_SEGMENT            | \
-                                 STATES_WAITING_FOR_MESSAGE            | \
-                                 STATES_WAITING_FOR_SEMAPHORE          | \
-                                 STATES_WAITING_FOR_MUTEX              | \
-                                 STATES_WAITING_FOR_CONDITION_VARIABLE | \
-                                 STATES_WAITING_FOR_JOIN_AT_EXIT       | \
-                                 STATES_WAITING_FOR_SIGNAL             | \
-                                 STATES_WAITING_FOR_BARRIER            | \
-                                 STATES_WAITING_FOR_RWLOCK             )
-
-/** This macro corresponds to a task waiting which is blocked on
- *  a thread queue. */
-#define STATES_WAITING_ON_THREAD_QUEUE \
-                               ( STATES_LOCALLY_BLOCKED         | \
-                                 STATES_WAITING_FOR_RPC_REPLY   )
-
-/** This macro corresponds to a task waiting which is blocked. */
-#define STATES_BLOCKED         ( STATES_DELAYING                | \
-                                 STATES_WAITING_FOR_TIME        | \
-                                 STATES_WAITING_FOR_PERIOD      | \
-                                 STATES_WAITING_FOR_EVENT       | \
-                                 STATES_WAITING_FOR_SYSTEM_EVENT | \
-                                 STATES_WAITING_ON_THREAD_QUEUE | \
-                                 STATES_INTERRUPTIBLE_BY_SIGNAL )
-
-#ifndef __RTEMS_APPLICATION__
-#include <rtems/score/states.inl>
-#endif
+/**@}*/
 
 #ifdef __cplusplus
 }
 #endif
 
-/**@}*/
-
 #endif
 /* end of include file */
diff --git a/cpukit/score/inline/rtems/score/states.inl b/cpukit/score/include/rtems/score/statesimpl.h
similarity index 68%
rename from cpukit/score/inline/rtems/score/states.inl
rename to cpukit/score/include/rtems/score/statesimpl.h
index 5dfdc42..bc89753 100644
--- a/cpukit/score/inline/rtems/score/states.inl
+++ b/cpukit/score/include/rtems/score/statesimpl.h
@@ -16,20 +16,101 @@
  *  http://www.rtems.com/license/LICENSE.
  */
 
-#ifndef _RTEMS_SCORE_STATES_H
-# error "Never use <rtems/score/states.inl> directly; include <rtems/score/states.h> instead."
-#endif
+#ifndef _RTEMS_SCORE_STATESIMPL_H
+#define _RTEMS_SCORE_STATESIMPL_H
 
-#ifndef _RTEMS_SCORE_STATES_INL
-#define _RTEMS_SCORE_STATES_INL
+#include <rtems/score/states.h>
+#include <rtems/score/basedefs.h>
 
-#include <rtems/score/basedefs.h> /* RTEMS_INLINE_ROUTINE */
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /**
  * @addtogroup ScoreStates
  */
 /**@{**/
 
+/*
+ *  The following constants define the individual states which may be
+ *  be used to compose and manipulate a thread's state.
+ */
+
+/** This macro corresponds to all states being set. */
+#define STATES_ALL_SET                         0xfffff
+/** This macro corresponds to a task being ready. */
+#define STATES_READY                           0x00000
+/** This macro corresponds to a task being created but not yet started. */
+#define STATES_DORMANT                         0x00001
+/** This macro corresponds to a task being suspended. */
+#define STATES_SUSPENDED                       0x00002
+/** This macro corresponds to a task being in an internal state transition. */
+#define STATES_TRANSIENT                       0x00004
+/** This macro corresponds to a task which is waiting for a timeout. */
+#define STATES_DELAYING                        0x00008
+/** This macro corresponds to a task waiting until a specific TOD. */
+#define STATES_WAITING_FOR_TIME                0x00010
+/** This macro corresponds to a task waiting for a variable length buffer. */
+#define STATES_WAITING_FOR_BUFFER              0x00020
+/** This macro corresponds to a task waiting for a fixed size segment. */
+#define STATES_WAITING_FOR_SEGMENT             0x00040
+/** This macro corresponds to a task waiting for a message. */
+#define STATES_WAITING_FOR_MESSAGE             0x00080
+/** This macro corresponds to a task waiting for an event. */
+#define STATES_WAITING_FOR_EVENT               0x00100
+/** This macro corresponds to a task waiting for a semaphore. */
+#define STATES_WAITING_FOR_SEMAPHORE           0x00200
+/** This macro corresponds to a task waiting for a mutex. */
+#define STATES_WAITING_FOR_MUTEX               0x00400
+/** This macro corresponds to a task waiting for a condition variable. */
+#define STATES_WAITING_FOR_CONDITION_VARIABLE  0x00800
+/** This macro corresponds to a task waiting for a join while exiting. */
+#define STATES_WAITING_FOR_JOIN_AT_EXIT        0x01000
+/** This macro corresponds to a task waiting for a reply to an MPCI request. */
+#define STATES_WAITING_FOR_RPC_REPLY           0x02000
+/** This macro corresponds to a task waiting for a period. */
+#define STATES_WAITING_FOR_PERIOD              0x04000
+/** This macro corresponds to a task waiting for a signal. */
+#define STATES_WAITING_FOR_SIGNAL              0x08000
+/** This macro corresponds to a task waiting for a barrier. */
+#define STATES_WAITING_FOR_BARRIER             0x10000
+/** This macro corresponds to a task waiting for a RWLock. */
+#define STATES_WAITING_FOR_RWLOCK              0x20000
+/** This macro corresponds to a task waiting for a system event. */
+#define STATES_WAITING_FOR_SYSTEM_EVENT        0x40000
+
+/** This macro corresponds to a task which is in an interruptible
+ *  blocking state.
+ */
+#define STATES_INTERRUPTIBLE_BY_SIGNAL         0x10000000
+
+/** This macro corresponds to a task waiting for a local object operation. */
+#define STATES_LOCALLY_BLOCKED ( STATES_WAITING_FOR_BUFFER             | \
+                                 STATES_WAITING_FOR_SEGMENT            | \
+                                 STATES_WAITING_FOR_MESSAGE            | \
+                                 STATES_WAITING_FOR_SEMAPHORE          | \
+                                 STATES_WAITING_FOR_MUTEX              | \
+                                 STATES_WAITING_FOR_CONDITION_VARIABLE | \
+                                 STATES_WAITING_FOR_JOIN_AT_EXIT       | \
+                                 STATES_WAITING_FOR_SIGNAL             | \
+                                 STATES_WAITING_FOR_BARRIER            | \
+                                 STATES_WAITING_FOR_RWLOCK             )
+
+/** This macro corresponds to a task waiting which is blocked on
+ *  a thread queue. */
+#define STATES_WAITING_ON_THREAD_QUEUE \
+                               ( STATES_LOCALLY_BLOCKED         | \
+                                 STATES_WAITING_FOR_RPC_REPLY   )
+
+/** This macro corresponds to a task waiting which is blocked. */
+#define STATES_BLOCKED         ( STATES_DELAYING                | \
+                                 STATES_WAITING_FOR_TIME        | \
+                                 STATES_WAITING_FOR_PERIOD      | \
+                                 STATES_WAITING_FOR_EVENT       | \
+                                 STATES_WAITING_FOR_SYSTEM_EVENT | \
+                                 STATES_WAITING_ON_THREAD_QUEUE | \
+                                 STATES_INTERRUPTIBLE_BY_SIGNAL )
+
 /**
  * This function sets the given states_to_set into the current_state
  * passed in.  The result is returned to the user in current_state.
@@ -388,5 +469,9 @@ RTEMS_INLINE_ROUTINE bool _States_Are_set (
 
 /** @} */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif
 /* end of include file */
diff --git a/cpukit/score/include/rtems/score/threadimpl.h b/cpukit/score/include/rtems/score/threadimpl.h
index 205c704..339ccd8 100644
--- a/cpukit/score/include/rtems/score/threadimpl.h
+++ b/cpukit/score/include/rtems/score/threadimpl.h
@@ -20,6 +20,7 @@
 #define _RTEMS_SCORE_THREADIMPL_H
 
 #include <rtems/score/thread.h>
+#include <rtems/score/statesimpl.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am
index e236716..8536ec4 100644
--- a/cpukit/score/preinstall.am
+++ b/cpukit/score/preinstall.am
@@ -207,6 +207,10 @@ $(PROJECT_INCLUDE)/rtems/score/states.h: include/rtems/score/states.h $(PROJECT_
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/states.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/states.h
 
+$(PROJECT_INCLUDE)/rtems/score/statesimpl.h: include/rtems/score/statesimpl.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/statesimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/statesimpl.h
+
 $(PROJECT_INCLUDE)/rtems/score/sysstate.h: include/rtems/score/sysstate.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/sysstate.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/sysstate.h
@@ -331,10 +335,6 @@ $(PROJECT_INCLUDE)/rtems/score/object.inl: inline/rtems/score/object.inl $(PROJE
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/object.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/object.inl
 
-$(PROJECT_INCLUDE)/rtems/score/states.inl: inline/rtems/score/states.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
-	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/states.inl
-PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/states.inl
-
 $(PROJECT_INCLUDE)/rtems/score/threadq.inl: inline/rtems/score/threadq.inl $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/threadq.inl
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/threadq.inl
diff --git a/cpukit/score/src/corebarrier.c b/cpukit/score/src/corebarrier.c
index 4713207..04bd875 100644
--- a/cpukit/score/src/corebarrier.c
+++ b/cpukit/score/src/corebarrier.c
@@ -18,9 +18,8 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
 #include <rtems/score/corebarrierimpl.h>
-#include <rtems/score/states.h>
+#include <rtems/score/statesimpl.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/corebarrierrelease.c b/cpukit/score/src/corebarrierrelease.c
index 2a27e41..12fc3bc 100644
--- a/cpukit/score/src/corebarrierrelease.c
+++ b/cpukit/score/src/corebarrierrelease.c
@@ -22,7 +22,6 @@
 #include <rtems/system.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/corebarrierimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/corebarrierwait.c b/cpukit/score/src/corebarrierwait.c
index 465402a..6ea1f25 100644
--- a/cpukit/score/src/corebarrierwait.c
+++ b/cpukit/score/src/corebarrierwait.c
@@ -21,7 +21,6 @@
 #include <rtems/system.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/corebarrierimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/coremsg.c b/cpukit/score/src/coremsg.c
index d620a52..72e1371 100644
--- a/cpukit/score/src/coremsg.c
+++ b/cpukit/score/src/coremsg.c
@@ -18,13 +18,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/coremsgimpl.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/statesimpl.h>
+#include <rtems/score/threadq.h>
 #include <rtems/score/wkspace.h>
 
 /*
diff --git a/cpukit/score/src/coremsgbroadcast.c b/cpukit/score/src/coremsgbroadcast.c
index 4591d0e..d860eb1 100644
--- a/cpukit/score/src/coremsgbroadcast.c
+++ b/cpukit/score/src/coremsgbroadcast.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
 #include <rtems/score/coremsgimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
diff --git a/cpukit/score/src/coremsgclose.c b/cpukit/score/src/coremsgclose.c
index 367357c..946a4f5 100644
--- a/cpukit/score/src/coremsgclose.c
+++ b/cpukit/score/src/coremsgclose.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
 #include <rtems/score/coremsgimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
diff --git a/cpukit/score/src/coremsgflush.c b/cpukit/score/src/coremsgflush.c
index 4185f4f..169b147 100644
--- a/cpukit/score/src/coremsgflush.c
+++ b/cpukit/score/src/coremsgflush.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
 #include <rtems/score/coremsgimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
diff --git a/cpukit/score/src/coremsgflushsupp.c b/cpukit/score/src/coremsgflushsupp.c
index dbc62ca..436e77f 100644
--- a/cpukit/score/src/coremsgflushsupp.c
+++ b/cpukit/score/src/coremsgflushsupp.c
@@ -24,7 +24,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
 #include <rtems/score/coremsgimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
diff --git a/cpukit/score/src/coremsgflushwait.c b/cpukit/score/src/coremsgflushwait.c
index 5816ce8..4355239 100644
--- a/cpukit/score/src/coremsgflushwait.c
+++ b/cpukit/score/src/coremsgflushwait.c
@@ -24,7 +24,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
 #include <rtems/score/coremsgimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
diff --git a/cpukit/score/src/coremsginsert.c b/cpukit/score/src/coremsginsert.c
index 69836df..fca5f07 100644
--- a/cpukit/score/src/coremsginsert.c
+++ b/cpukit/score/src/coremsginsert.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
 #include <rtems/score/coremsgimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
diff --git a/cpukit/score/src/coremsgseize.c b/cpukit/score/src/coremsgseize.c
index 5d64616..24d6f57 100644
--- a/cpukit/score/src/coremsgseize.c
+++ b/cpukit/score/src/coremsgseize.c
@@ -23,7 +23,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
 #include <rtems/score/coremsgimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
diff --git a/cpukit/score/src/coremsgsubmit.c b/cpukit/score/src/coremsgsubmit.c
index 6acaada..09982dc 100644
--- a/cpukit/score/src/coremsgsubmit.c
+++ b/cpukit/score/src/coremsgsubmit.c
@@ -24,7 +24,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
 #include <rtems/score/coremsgimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
 
diff --git a/cpukit/score/src/coremutex.c b/cpukit/score/src/coremutex.c
index 8ea7d13..1d0f596 100644
--- a/cpukit/score/src/coremutex.c
+++ b/cpukit/score/src/coremutex.c
@@ -21,7 +21,6 @@
 #include <rtems/system.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/coremuteximpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/coremutexflush.c b/cpukit/score/src/coremutexflush.c
index 5aec9e5..5e87f0c 100644
--- a/cpukit/score/src/coremutexflush.c
+++ b/cpukit/score/src/coremutexflush.c
@@ -21,7 +21,6 @@
 #include <rtems/system.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/coremuteximpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/coremutexseize.c b/cpukit/score/src/coremutexseize.c
index dee9f7d..dc74bee 100644
--- a/cpukit/score/src/coremutexseize.c
+++ b/cpukit/score/src/coremutexseize.c
@@ -22,7 +22,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/schedulerimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/coremutexseizeintr.c b/cpukit/score/src/coremutexseizeintr.c
index cc726b6..70101d0 100644
--- a/cpukit/score/src/coremutexseizeintr.c
+++ b/cpukit/score/src/coremutexseizeintr.c
@@ -21,7 +21,6 @@
 #include <rtems/system.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/coremuteximpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/coremutexsurrender.c b/cpukit/score/src/coremutexsurrender.c
index 12f84d3..e411f77 100644
--- a/cpukit/score/src/coremutexsurrender.c
+++ b/cpukit/score/src/coremutexsurrender.c
@@ -21,7 +21,6 @@
 #include <rtems/system.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/coremuteximpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/corerwlock.c b/cpukit/score/src/corerwlock.c
index 1f70bc6..2d49e83 100644
--- a/cpukit/score/src/corerwlock.c
+++ b/cpukit/score/src/corerwlock.c
@@ -18,10 +18,8 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
 #include <rtems/score/corerwlockimpl.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/statesimpl.h>
 #include <rtems/score/threadq.h>
 
 void _CORE_RWLock_Initialize(
diff --git a/cpukit/score/src/corerwlockobtainread.c b/cpukit/score/src/corerwlockobtainread.c
index 2447360..fc3ce24 100644
--- a/cpukit/score/src/corerwlockobtainread.c
+++ b/cpukit/score/src/corerwlockobtainread.c
@@ -20,7 +20,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/corerwlockimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdog.h>
 
diff --git a/cpukit/score/src/corerwlockobtainwrite.c b/cpukit/score/src/corerwlockobtainwrite.c
index 1eca63c..8c00a8f 100644
--- a/cpukit/score/src/corerwlockobtainwrite.c
+++ b/cpukit/score/src/corerwlockobtainwrite.c
@@ -20,7 +20,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/corerwlockimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdog.h>
 
diff --git a/cpukit/score/src/corerwlockrelease.c b/cpukit/score/src/corerwlockrelease.c
index c0b23e0..245390a 100644
--- a/cpukit/score/src/corerwlockrelease.c
+++ b/cpukit/score/src/corerwlockrelease.c
@@ -21,7 +21,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/corerwlockimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdog.h>
 
diff --git a/cpukit/score/src/coresem.c b/cpukit/score/src/coresem.c
index 46d0334..0257c12 100644
--- a/cpukit/score/src/coresem.c
+++ b/cpukit/score/src/coresem.c
@@ -18,11 +18,8 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/score/isr.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/statesimpl.h>
 #include <rtems/score/threadq.h>
 
 void _CORE_semaphore_Initialize(
diff --git a/cpukit/score/src/coresemflush.c b/cpukit/score/src/coresemflush.c
index c1b68a7..4c691c8 100644
--- a/cpukit/score/src/coresemflush.c
+++ b/cpukit/score/src/coresemflush.c
@@ -21,7 +21,6 @@
 #include <rtems/system.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/coresemseize.c b/cpukit/score/src/coresemseize.c
index 8da9ca3..5ed5ee6 100644
--- a/cpukit/score/src/coresemseize.c
+++ b/cpukit/score/src/coresemseize.c
@@ -22,7 +22,6 @@
 #include <rtems/system.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/coresemsurrender.c b/cpukit/score/src/coresemsurrender.c
index 2a8d208..59fdbeb 100644
--- a/cpukit/score/src/coresemsurrender.c
+++ b/cpukit/score/src/coresemsurrender.c
@@ -22,7 +22,6 @@
 #include <rtems/system.h>
 #include <rtems/score/isr.h>
 #include <rtems/score/coresemimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/corespinlock.c b/cpukit/score/src/corespinlock.c
index 013178b..0b4dba3 100644
--- a/cpukit/score/src/corespinlock.c
+++ b/cpukit/score/src/corespinlock.c
@@ -21,7 +21,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/corespinlockimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threadq.h>
 
diff --git a/cpukit/score/src/corespinlockrelease.c b/cpukit/score/src/corespinlockrelease.c
index b2c9b53..a9c39bc 100644
--- a/cpukit/score/src/corespinlockrelease.c
+++ b/cpukit/score/src/corespinlockrelease.c
@@ -20,7 +20,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/corespinlockimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/watchdog.h>
 
diff --git a/cpukit/score/src/corespinlockwait.c b/cpukit/score/src/corespinlockwait.c
index 689180a..b8cb58f 100644
--- a/cpukit/score/src/corespinlockwait.c
+++ b/cpukit/score/src/corespinlockwait.c
@@ -20,7 +20,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/corespinlockimpl.h>
-#include <rtems/score/states.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/threaddispatch.h>
 
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index 4cfdc85..043f243 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -26,7 +26,6 @@
 #include <rtems/config.h>
 #include <rtems/score/cpu.h>
 #include <rtems/score/interr.h>
-#include <rtems/score/states.h>
 #include <rtems/score/threadimpl.h>
 #include <rtems/score/threadq.h>
 #include <rtems/score/tqdata.h>
diff --git a/cpukit/score/src/threaddispatchdisablelevel.c b/cpukit/score/src/threaddispatchdisablelevel.c
index 439a6e6..d15f4b1 100644
--- a/cpukit/score/src/threaddispatchdisablelevel.c
+++ b/cpukit/score/src/threaddispatchdisablelevel.c
@@ -22,7 +22,6 @@
 #include <rtems/score/isr.h>
 #include <rtems/score/object.h>
 #include <rtems/score/priority.h>
-#include <rtems/score/states.h>
 #include <rtems/score/threaddispatch.h>
 
 #define NO_OWNER_CPU 0xffffffffU
diff --git a/cpukit/score/src/threadq.c b/cpukit/score/src/threadq.c
index 4563f0f..c5e694e 100644
--- a/cpukit/score/src/threadq.c
+++ b/cpukit/score/src/threadq.c
@@ -22,7 +22,6 @@
 #include <rtems/score/chainimpl.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>
diff --git a/cpukit/score/src/threadqdequeue.c b/cpukit/score/src/threadqdequeue.c
index 93675fb..4cdc8ed 100644
--- a/cpukit/score/src/threadqdequeue.c
+++ b/cpukit/score/src/threadqdequeue.c
@@ -23,7 +23,6 @@
 #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>
diff --git a/cpukit/score/src/threadqenqueuefifo.c b/cpukit/score/src/threadqenqueuefifo.c
index 44bdfd5..91c6466 100644
--- a/cpukit/score/src/threadqenqueuefifo.c
+++ b/cpukit/score/src/threadqenqueuefifo.c
@@ -22,7 +22,6 @@
 #include <rtems/score/chainimpl.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>
diff --git a/cpukit/score/src/threadqenqueuepriority.c b/cpukit/score/src/threadqenqueuepriority.c
index 5711702..a9d0c6b 100644
--- a/cpukit/score/src/threadqenqueuepriority.c
+++ b/cpukit/score/src/threadqenqueuepriority.c
@@ -18,14 +18,9 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/score/chainimpl.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/statesimpl.h>
 
 /*
  *  Support the user forcing the unrolling to be disabled.
diff --git a/cpukit/score/src/threadqextract.c b/cpukit/score/src/threadqextract.c
index 3b6aac5..9d0d40c 100644
--- a/cpukit/score/src/threadqextract.c
+++ b/cpukit/score/src/threadqextract.c
@@ -23,7 +23,6 @@
 #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>
diff --git a/cpukit/score/src/threadqextractwithproxy.c b/cpukit/score/src/threadqextractwithproxy.c
index 7c8b84b..d7245e5 100644
--- a/cpukit/score/src/threadqextractwithproxy.c
+++ b/cpukit/score/src/threadqextractwithproxy.c
@@ -23,14 +23,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/statesimpl.h>
 
 bool _Thread_queue_Extract_with_proxy(
   Thread_Control       *the_thread
diff --git a/cpukit/score/src/threadqfirst.c b/cpukit/score/src/threadqfirst.c
index ef8a131..1108188 100644
--- a/cpukit/score/src/threadqfirst.c
+++ b/cpukit/score/src/threadqfirst.c
@@ -22,7 +22,6 @@
 #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>
diff --git a/cpukit/score/src/threadqfirstfifo.c b/cpukit/score/src/threadqfirstfifo.c
index 08d90ce..9b47302 100644
--- a/cpukit/score/src/threadqfirstfifo.c
+++ b/cpukit/score/src/threadqfirstfifo.c
@@ -22,7 +22,6 @@
 #include <rtems/score/chainimpl.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>
diff --git a/cpukit/score/src/threadqfirstpriority.c b/cpukit/score/src/threadqfirstpriority.c
index 5b2d56a..4a75a8b 100644
--- a/cpukit/score/src/threadqfirstpriority.c
+++ b/cpukit/score/src/threadqfirstpriority.c
@@ -26,7 +26,6 @@
 #include <rtems/score/chainimpl.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>
diff --git a/cpukit/score/src/threadqflush.c b/cpukit/score/src/threadqflush.c
index 8209d58..46eb839 100644
--- a/cpukit/score/src/threadqflush.c
+++ b/cpukit/score/src/threadqflush.c
@@ -22,7 +22,6 @@
 #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>
diff --git a/cpukit/score/src/threadqrequeue.c b/cpukit/score/src/threadqrequeue.c
index 15cf011..c2a8cad 100644
--- a/cpukit/score/src/threadqrequeue.c
+++ b/cpukit/score/src/threadqrequeue.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/statesimpl.h>
 
 void _Thread_queue_Requeue(
   Thread_queue_Control *the_thread_queue,




More information about the vc mailing list