[rtems commit] score: Create mpci implementation header

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


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

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Jul 25 09:10:38 2013 +0200

score: Create mpci implementation header

Move implementation specific parts of mpci.h into new header file
mpciimpl.h.  The mpci.h contains now only the application visible API.

---

 cpukit/posix/src/mutex.c                     |    3 -
 cpukit/posix/src/mutexget.c                  |    3 -
 cpukit/posix/src/mutexgetprioceiling.c       |    3 -
 cpukit/posix/src/mutexlock.c                 |    3 -
 cpukit/posix/src/mutexlocksupp.c             |    3 -
 cpukit/posix/src/mutextimedlock.c            |    3 -
 cpukit/posix/src/mutextrylock.c              |    3 -
 cpukit/posix/src/mutexunlock.c               |    3 -
 cpukit/rtems/include/rtems/rtems/barriermp.h |   25 +--
 cpukit/rtems/include/rtems/rtems/eventmp.h   |    7 +-
 cpukit/rtems/include/rtems/rtems/msgmp.h     |    5 +-
 cpukit/rtems/include/rtems/rtems/partmp.h    |    5 +-
 cpukit/rtems/include/rtems/rtems/regionmp.h  |    4 +-
 cpukit/rtems/include/rtems/rtems/signalmp.h  |   12 +-
 cpukit/rtems/include/rtems/rtems/taskmp.h    |    6 +-
 cpukit/rtems/include/rtems/rtems/types.h     |    1 -
 cpukit/rtems/src/barrier.c                   |    3 -
 cpukit/rtems/src/event.c                     |    3 -
 cpukit/rtems/src/mp.c                        |    4 +-
 cpukit/rtems/src/msg.c                       |    3 -
 cpukit/rtems/src/msgmp.c                     |    9 +-
 cpukit/rtems/src/msgqallocate.c              |    3 -
 cpukit/rtems/src/msgqbroadcast.c             |    3 -
 cpukit/rtems/src/msgqcreate.c                |    3 -
 cpukit/rtems/src/msgqdelete.c                |    3 -
 cpukit/rtems/src/msgqflush.c                 |    3 -
 cpukit/rtems/src/msgqgetnumberpending.c      |    3 -
 cpukit/rtems/src/msgqident.c                 |    3 -
 cpukit/rtems/src/msgqreceive.c               |    3 -
 cpukit/rtems/src/msgqsend.c                  |    3 -
 cpukit/rtems/src/msgqtranslatereturncode.c   |    3 -
 cpukit/rtems/src/msgqurgent.c                |    3 -
 cpukit/rtems/src/regionmp.c                  |    9 +-
 cpukit/rtems/src/sem.c                       |    3 -
 cpukit/rtems/src/semcreate.c                 |    3 -
 cpukit/rtems/src/semdelete.c                 |    3 -
 cpukit/rtems/src/semflush.c                  |    3 -
 cpukit/rtems/src/semident.c                  |    3 -
 cpukit/rtems/src/semmp.c                     |   10 +-
 cpukit/rtems/src/semobtain.c                 |    3 -
 cpukit/rtems/src/semrelease.c                |    3 -
 cpukit/rtems/src/taskmp.c                    |   10 +-
 cpukit/sapi/src/exinit.c                     |    3 -
 cpukit/score/Makefile.am                     |    1 +
 cpukit/score/include/rtems/score/mpci.h      |  324 +------------------------
 cpukit/score/include/rtems/score/mpciimpl.h  |  337 ++++++++++++++++++++++++++
 cpukit/score/include/rtems/score/threadmp.h  |    2 +-
 cpukit/score/preinstall.am                   |    4 +
 cpukit/score/src/mpci.c                      |   16 +-
 cpukit/score/src/threadmp.c                  |    5 +-
 testsuites/sptests/spsize/size.c             |    4 +-
 51 files changed, 388 insertions(+), 502 deletions(-)

diff --git a/cpukit/posix/src/mutex.c b/cpukit/posix/src/mutex.c
index 4a5c678..ccc0af8 100644
--- a/cpukit/posix/src/mutex.c
+++ b/cpukit/posix/src/mutex.c
@@ -26,9 +26,6 @@
 #include <rtems/config.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/muteximpl.h>
 #include <rtems/posix/priorityimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexget.c b/cpukit/posix/src/mutexget.c
index ebfe8aa..e281457 100644
--- a/cpukit/posix/src/mutexget.c
+++ b/cpukit/posix/src/mutexget.c
@@ -23,9 +23,6 @@
 
 #include <rtems/system.h>
 #include <rtems/score/coremuteximpl.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/muteximpl.h>
 
 
diff --git a/cpukit/posix/src/mutexgetprioceiling.c b/cpukit/posix/src/mutexgetprioceiling.c
index 53298e2..0daaad7 100644
--- a/cpukit/posix/src/mutexgetprioceiling.c
+++ b/cpukit/posix/src/mutexgetprioceiling.c
@@ -24,9 +24,6 @@
 #include <rtems/system.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/muteximpl.h>
 #include <rtems/posix/priorityimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexlock.c b/cpukit/posix/src/mutexlock.c
index 9ccb405..820c77a 100644
--- a/cpukit/posix/src/mutexlock.c
+++ b/cpukit/posix/src/mutexlock.c
@@ -24,9 +24,6 @@
 #include <rtems/system.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/muteximpl.h>
 #include <rtems/posix/priorityimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexlocksupp.c b/cpukit/posix/src/mutexlocksupp.c
index c617285..cba64da 100644
--- a/cpukit/posix/src/mutexlocksupp.c
+++ b/cpukit/posix/src/mutexlocksupp.c
@@ -24,9 +24,6 @@
 #include <rtems/system.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/muteximpl.h>
 #include <rtems/posix/priorityimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutextimedlock.c b/cpukit/posix/src/mutextimedlock.c
index bcf7fdd..929a52c 100644
--- a/cpukit/posix/src/mutextimedlock.c
+++ b/cpukit/posix/src/mutextimedlock.c
@@ -24,9 +24,6 @@
 #include <rtems/system.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/muteximpl.h>
 #include <rtems/posix/priorityimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutextrylock.c b/cpukit/posix/src/mutextrylock.c
index 2f8615c..c35b0bb 100644
--- a/cpukit/posix/src/mutextrylock.c
+++ b/cpukit/posix/src/mutextrylock.c
@@ -24,9 +24,6 @@
 #include <rtems/system.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/muteximpl.h>
 #include <rtems/posix/priorityimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/mutexunlock.c b/cpukit/posix/src/mutexunlock.c
index d167357..fe1acb0 100644
--- a/cpukit/posix/src/mutexunlock.c
+++ b/cpukit/posix/src/mutexunlock.c
@@ -24,9 +24,6 @@
 #include <rtems/system.h>
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/watchdog.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/posix/muteximpl.h>
 #include <rtems/posix/priorityimpl.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/rtems/include/rtems/rtems/barriermp.h b/cpukit/rtems/include/rtems/rtems/barriermp.h
index d2a203b..c497140 100644
--- a/cpukit/rtems/include/rtems/rtems/barriermp.h
+++ b/cpukit/rtems/include/rtems/rtems/barriermp.h
@@ -15,8 +15,14 @@
  * http://www.rtems.com/license/LICENSE.
  */
 
-#ifndef _RTEMS_RTEMS_SEMMP_H
-#define _RTEMS_RTEMS_SEMMP_H
+#ifndef _RTEMS_RTEMS_BARRIERMP_H
+#define _RTEMS_RTEMS_BARRIERMP_H
+
+#include <rtems/score/mpciimpl.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /**
  *  @defgroup ClassicBarrierMP Barrier MP Support
@@ -27,17 +33,6 @@
  */
 /**@{*/
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/rtems/barrier.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
 /**
  *  The following enumerated type defines the list of
  *  remote barrier operations.
@@ -141,11 +136,11 @@ void _Barrier_MP_Send_extract_proxy (
  */
 Barrier_MP_Packet *_Barrier_MP_Get_packet ( void );
 
+/**@}*/
+
 #ifdef __cplusplus
 }
 #endif
 
-/**@}*/
-
 #endif
 /* end of file */
diff --git a/cpukit/rtems/include/rtems/rtems/eventmp.h b/cpukit/rtems/include/rtems/rtems/eventmp.h
index 128cc4e..d672da8 100644
--- a/cpukit/rtems/include/rtems/rtems/eventmp.h
+++ b/cpukit/rtems/include/rtems/rtems/eventmp.h
@@ -25,15 +25,12 @@
 # error "Never use <rtems/rtems/eventmp.h> directly; include <rtems/rtems/eventimpl.h> instead."
 #endif
 
+#include <rtems/score/mpciimpl.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
 /**
  *  @defgroup ClassicEventMP Event MP Support
  *
diff --git a/cpukit/rtems/include/rtems/rtems/msgmp.h b/cpukit/rtems/include/rtems/rtems/msgmp.h
index ddb21b2..87ae40d 100644
--- a/cpukit/rtems/include/rtems/rtems/msgmp.h
+++ b/cpukit/rtems/include/rtems/rtems/msgmp.h
@@ -22,10 +22,7 @@
 # error "Never use <rtems/rtems/msgmp.h> directly; include <rtems/rtems/messageimpl.h> instead."
 #endif
 
-#include <rtems/rtems/messageimpl.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
+#include <rtems/score/mpciimpl.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/cpukit/rtems/include/rtems/rtems/partmp.h b/cpukit/rtems/include/rtems/rtems/partmp.h
index 6eae109..4d3bf27 100644
--- a/cpukit/rtems/include/rtems/rtems/partmp.h
+++ b/cpukit/rtems/include/rtems/rtems/partmp.h
@@ -22,10 +22,7 @@
 # error "Never use <rtems/rtems/partmp.h> directly; include <rtems/rtems/partimpl.h> instead."
 #endif
 
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/mpciimpl.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/cpukit/rtems/include/rtems/rtems/regionmp.h b/cpukit/rtems/include/rtems/rtems/regionmp.h
index 972f1ba..65eb88b 100644
--- a/cpukit/rtems/include/rtems/rtems/regionmp.h
+++ b/cpukit/rtems/include/rtems/rtems/regionmp.h
@@ -25,9 +25,7 @@
 # error "Never use <rtems/rtems/regionmp.h> directly; include <rtems/rtems/regionimpl.h> instead."
 #endif
 
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/mpciimpl.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/cpukit/rtems/include/rtems/rtems/signalmp.h b/cpukit/rtems/include/rtems/rtems/signalmp.h
index dd1271d..3d1608e 100644
--- a/cpukit/rtems/include/rtems/rtems/signalmp.h
+++ b/cpukit/rtems/include/rtems/rtems/signalmp.h
@@ -22,16 +22,12 @@
 # error "Never use <rtems/rtems/signalmp.h> directly; include <rtems/rtems/signalimpl.h> instead."
 #endif
 
+#include <rtems/score/mpciimpl.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#include <rtems/rtems/asr.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-
 /**
  *  @defgroup ClassicSignalMP Signal MP Support
  *
@@ -132,11 +128,11 @@ void _Signal_MP_Process_packet (
  */
 Signal_MP_Packet *_Signal_MP_Get_packet ( void );
 
+/**@}*/
+
 #ifdef __cplusplus
 }
 #endif
 
-/**@}*/
-
 #endif
 /* end of file */
diff --git a/cpukit/rtems/include/rtems/rtems/taskmp.h b/cpukit/rtems/include/rtems/rtems/taskmp.h
index 4102b9c..1bce74b 100644
--- a/cpukit/rtems/include/rtems/rtems/taskmp.h
+++ b/cpukit/rtems/include/rtems/rtems/taskmp.h
@@ -25,11 +25,7 @@
 # error "Never use <rtems/rtems/taskmp.h> directly; include <rtems/rtems/tasksimpl.h> instead."
 #endif
 
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
-#include <rtems/score/priority.h>
-#include <rtems/score/thread.h>
+#include <rtems/score/mpciimpl.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/cpukit/rtems/include/rtems/rtems/types.h b/cpukit/rtems/include/rtems/rtems/types.h
index f9861aa..60a787d 100644
--- a/cpukit/rtems/include/rtems/rtems/types.h
+++ b/cpukit/rtems/include/rtems/rtems/types.h
@@ -31,7 +31,6 @@
 #include <rtems/rtems/modes.h>
 #if defined(RTEMS_MULTIPROCESSING)
 #include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
 #endif
 
 #ifdef __cplusplus
diff --git a/cpukit/rtems/src/barrier.c b/cpukit/rtems/src/barrier.c
index fc96703..248fcad 100644
--- a/cpukit/rtems/src/barrier.c
+++ b/cpukit/rtems/src/barrier.c
@@ -31,9 +31,6 @@
 #include <rtems/rtems/support.h>
 #include <rtems/score/object.h>
 #include <rtems/rtems/barrierimpl.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 
 /**
  *  @brief _Barrier_Manager_initialization
diff --git a/cpukit/rtems/src/event.c b/cpukit/rtems/src/event.c
index 5e058c3..9054bad 100644
--- a/cpukit/rtems/src/event.c
+++ b/cpukit/rtems/src/event.c
@@ -19,9 +19,6 @@
 #endif
 
 #include <rtems/rtems/eventimpl.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 
 void _Event_Manager_initialization( void )
 {
diff --git a/cpukit/rtems/src/mp.c b/cpukit/rtems/src/mp.c
index 2d2996c..0b65e8c 100644
--- a/cpukit/rtems/src/mp.c
+++ b/cpukit/rtems/src/mp.c
@@ -18,10 +18,8 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
 #include <rtems/rtems/mp.h>
-#include <rtems/score/mpci.h>
+#include <rtems/score/mpciimpl.h>
 
 void _Multiprocessing_Manager_initialization ( void )
 {
diff --git a/cpukit/rtems/src/msg.c b/cpukit/rtems/src/msg.c
index 491122f..bf6c5d6 100644
--- a/cpukit/rtems/src/msg.c
+++ b/cpukit/rtems/src/msg.c
@@ -26,9 +26,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgmp.c b/cpukit/rtems/src/msgmp.c
index f045b69..ae9806e 100644
--- a/cpukit/rtems/src/msgmp.c
+++ b/cpukit/rtems/src/msgmp.c
@@ -18,16 +18,9 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
 #include <rtems/rtems/messageimpl.h>
-#include <rtems/score/mpci.h>
-#include <rtems/rtems/msgmp.h>
-#include <rtems/score/object.h>
 #include <rtems/rtems/optionsimpl.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/support.h>
+#include <rtems/score/coremsgimpl.h>
 #include <rtems/score/statesimpl.h>
 #include <rtems/score/threadimpl.h>
 
diff --git a/cpukit/rtems/src/msgqallocate.c b/cpukit/rtems/src/msgqallocate.c
index 7d85c77..8058b30 100644
--- a/cpukit/rtems/src/msgqallocate.c
+++ b/cpukit/rtems/src/msgqallocate.c
@@ -25,9 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgqbroadcast.c b/cpukit/rtems/src/msgqbroadcast.c
index f02af25..ec06b20 100644
--- a/cpukit/rtems/src/msgqbroadcast.c
+++ b/cpukit/rtems/src/msgqbroadcast.c
@@ -25,9 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgqcreate.c b/cpukit/rtems/src/msgqcreate.c
index 67d82ed..2df0e21 100644
--- a/cpukit/rtems/src/msgqcreate.c
+++ b/cpukit/rtems/src/msgqcreate.c
@@ -26,9 +26,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgqdelete.c b/cpukit/rtems/src/msgqdelete.c
index c133ac1..cbb8560 100644
--- a/cpukit/rtems/src/msgqdelete.c
+++ b/cpukit/rtems/src/msgqdelete.c
@@ -25,9 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgqflush.c b/cpukit/rtems/src/msgqflush.c
index 9c70196..f6deb2b 100644
--- a/cpukit/rtems/src/msgqflush.c
+++ b/cpukit/rtems/src/msgqflush.c
@@ -25,9 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgqgetnumberpending.c b/cpukit/rtems/src/msgqgetnumberpending.c
index 3dd1b9d..6b7709e 100644
--- a/cpukit/rtems/src/msgqgetnumberpending.c
+++ b/cpukit/rtems/src/msgqgetnumberpending.c
@@ -25,9 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgqident.c b/cpukit/rtems/src/msgqident.c
index 2dc5e22..e0b3d78 100644
--- a/cpukit/rtems/src/msgqident.c
+++ b/cpukit/rtems/src/msgqident.c
@@ -25,9 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/statusimpl.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgqreceive.c b/cpukit/rtems/src/msgqreceive.c
index 8518899..b2f1134 100644
--- a/cpukit/rtems/src/msgqreceive.c
+++ b/cpukit/rtems/src/msgqreceive.c
@@ -25,9 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgqsend.c b/cpukit/rtems/src/msgqsend.c
index 4a251b9..36f1021 100644
--- a/cpukit/rtems/src/msgqsend.c
+++ b/cpukit/rtems/src/msgqsend.c
@@ -25,9 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgqtranslatereturncode.c b/cpukit/rtems/src/msgqtranslatereturncode.c
index 1567063..8819756 100644
--- a/cpukit/rtems/src/msgqtranslatereturncode.c
+++ b/cpukit/rtems/src/msgqtranslatereturncode.c
@@ -25,9 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/threadimpl.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/msgqurgent.c b/cpukit/rtems/src/msgqurgent.c
index f16c0bb..4032855 100644
--- a/cpukit/rtems/src/msgqurgent.c
+++ b/cpukit/rtems/src/msgqurgent.c
@@ -25,9 +25,6 @@
 #include <rtems/score/object.h>
 #include <rtems/score/thread.h>
 #include <rtems/score/wkspace.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/rtems/status.h>
 #include <rtems/rtems/attrimpl.h>
 #include <rtems/rtems/messageimpl.h>
diff --git a/cpukit/rtems/src/regionmp.c b/cpukit/rtems/src/regionmp.c
index 7f45c20..46153c9 100644
--- a/cpukit/rtems/src/regionmp.c
+++ b/cpukit/rtems/src/regionmp.c
@@ -18,15 +18,8 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/optionsimpl.h>
 #include <rtems/rtems/regionimpl.h>
-#include <rtems/score/thread.h>
-#include <rtems/rtems/support.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/score/statesimpl.h>
 #include <rtems/score/threadimpl.h>
 #include <rtems/score/threadqimpl.h>
diff --git a/cpukit/rtems/src/sem.c b/cpukit/rtems/src/sem.c
index 7136802..83fe07f 100644
--- a/cpukit/rtems/src/sem.c
+++ b/cpukit/rtems/src/sem.c
@@ -30,9 +30,6 @@
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
 #include <rtems/score/thread.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 
 #include <rtems/score/interr.h>
 
diff --git a/cpukit/rtems/src/semcreate.c b/cpukit/rtems/src/semcreate.c
index 3246d48..716cbe4 100644
--- a/cpukit/rtems/src/semcreate.c
+++ b/cpukit/rtems/src/semcreate.c
@@ -29,9 +29,6 @@
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
 #include <rtems/score/thread.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/score/sysstate.h>
 
 #include <rtems/score/interr.h>
diff --git a/cpukit/rtems/src/semdelete.c b/cpukit/rtems/src/semdelete.c
index 31fafb5..0586a19 100644
--- a/cpukit/rtems/src/semdelete.c
+++ b/cpukit/rtems/src/semdelete.c
@@ -29,9 +29,6 @@
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
 #include <rtems/score/thread.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 
 #include <rtems/score/interr.h>
 
diff --git a/cpukit/rtems/src/semflush.c b/cpukit/rtems/src/semflush.c
index 6353f6c..f6b09ec 100644
--- a/cpukit/rtems/src/semflush.c
+++ b/cpukit/rtems/src/semflush.c
@@ -29,9 +29,6 @@
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
 #include <rtems/score/thread.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 
 #include <rtems/score/interr.h>
 
diff --git a/cpukit/rtems/src/semident.c b/cpukit/rtems/src/semident.c
index 7a8f6d8..10c7f94 100644
--- a/cpukit/rtems/src/semident.c
+++ b/cpukit/rtems/src/semident.c
@@ -29,9 +29,6 @@
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
 #include <rtems/score/thread.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 
 #include <rtems/score/interr.h>
 
diff --git a/cpukit/rtems/src/semmp.c b/cpukit/rtems/src/semmp.c
index 21dfc1e..de17665 100644
--- a/cpukit/rtems/src/semmp.c
+++ b/cpukit/rtems/src/semmp.c
@@ -18,16 +18,8 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/optionsimpl.h>
 #include <rtems/rtems/semimpl.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/support.h>
+#include <rtems/rtems/optionsimpl.h>
 
 RTEMS_STATIC_ASSERT(
   sizeof(Semaphore_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
diff --git a/cpukit/rtems/src/semobtain.c b/cpukit/rtems/src/semobtain.c
index f204221..fb0ad1f 100644
--- a/cpukit/rtems/src/semobtain.c
+++ b/cpukit/rtems/src/semobtain.c
@@ -29,9 +29,6 @@
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
 #include <rtems/score/thread.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 
 #include <rtems/score/interr.h>
 
diff --git a/cpukit/rtems/src/semrelease.c b/cpukit/rtems/src/semrelease.c
index 109cb7c..fae58f5 100644
--- a/cpukit/rtems/src/semrelease.c
+++ b/cpukit/rtems/src/semrelease.c
@@ -44,9 +44,6 @@
 #include <rtems/score/coremuteximpl.h>
 #include <rtems/score/coresemimpl.h>
 #include <rtems/score/thread.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 
 #include <rtems/score/interr.h>
 
diff --git a/cpukit/rtems/src/taskmp.c b/cpukit/rtems/src/taskmp.c
index 08b7be1..5f29f20 100644
--- a/cpukit/rtems/src/taskmp.c
+++ b/cpukit/rtems/src/taskmp.c
@@ -18,16 +18,8 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/rtems/status.h>
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#include <rtems/score/object.h>
-#include <rtems/rtems/options.h>
 #include <rtems/rtems/tasksimpl.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/watchdog.h>
-#include <rtems/rtems/support.h>
+#include <rtems/rtems/optionsimpl.h>
 #include <rtems/score/statesimpl.h>
 #include <rtems/score/threadimpl.h>
 #include <rtems/score/threadqimpl.h>
diff --git a/cpukit/sapi/src/exinit.c b/cpukit/sapi/src/exinit.c
index 0c4e1b0..b35393c 100644
--- a/cpukit/sapi/src/exinit.c
+++ b/cpukit/sapi/src/exinit.c
@@ -44,9 +44,6 @@
 #include <rtems/score/heap.h>
 #include <rtems/score/interr.h>
 #include <rtems/score/isr.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#endif
 #include <rtems/score/priority.h>
 #include <rtems/score/prioritybitmapimpl.h>
 #include <rtems/score/schedulerimpl.h>
diff --git a/cpukit/score/Makefile.am b/cpukit/score/Makefile.am
index d6bac45..b5ffe57 100644
--- a/cpukit/score/Makefile.am
+++ b/cpukit/score/Makefile.am
@@ -90,6 +90,7 @@ endif
 if HAS_MP
 # We only build multiprocessing related files if HAS_MP was defined
 include_rtems_score_HEADERS += include/rtems/score/mpci.h
+include_rtems_score_HEADERS += include/rtems/score/mpciimpl.h
 include_rtems_score_HEADERS += include/rtems/score/mppkt.h
 include_rtems_score_HEADERS += include/rtems/score/objectmp.h
 include_rtems_score_HEADERS += include/rtems/score/threadmp.h
diff --git a/cpukit/score/include/rtems/score/mpci.h b/cpukit/score/include/rtems/score/mpci.h
index 3cb9386..33674d6 100644
--- a/cpukit/score/include/rtems/score/mpci.h
+++ b/cpukit/score/include/rtems/score/mpci.h
@@ -1,10 +1,9 @@
 /**
- *  @file  rtems/score/mpci.h
+ * @file
  *
- *  @brief Constants and Structures Associated with the MPCI Layer
+ * @ingroup ScoreMPCI
  *
- *  This include file contains all the constants and structures associated
- *  with the MPCI layer.  It provides mechanisms to utilize packets.
+ * @brief MPCI Layer API
  */
 
 /*
@@ -19,6 +18,15 @@
 #ifndef _RTEMS_SCORE_MPCI_H
 #define _RTEMS_SCORE_MPCI_H
 
+#include <rtems/score/mppkt.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/threadq.h>
+#include <rtems/score/watchdog.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  *  @defgroup ScoreMPCI MPCI Handler
  *
@@ -32,29 +40,12 @@
 */
 /**@{*/
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <rtems/score/mppkt.h>
-#include <rtems/score/thread.h>
-#include <rtems/score/threadq.h>
-#include <rtems/score/watchdog.h>
-
 /**
  *  The following defines the node number used when a broadcast is desired.
  */
 #define MPCI_ALL_NODES 0
 
 /**
- *  For packets associated with requests that don't already have a timeout,
- *  use the one specified by this MPCI driver.  The value specified by
- *   the MPCI driver sets an upper limit on how long a remote request
- *   should take to complete.
- */
-#define MPCI_DEFAULT_TIMEOUT    0xFFFFFFFF
-
-/**
  *  This type is returned by all user provided MPCI routines.
  */
 typedef void MPCI_Entry;
@@ -134,300 +125,11 @@ typedef struct {
   MPCI_receive_entry         receive_packet;
 } MPCI_Control;
 
-/**
- *  The following defines the type for packet processing routines
- *  invoked by the MPCI Receive server.
- */
-typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * );
-
-/**
- *  The following enumerated type defines the list of
- *  internal MP operations.
- */
-typedef enum {
-  MPCI_PACKETS_SYSTEM_VERIFY  =  0
-}   MPCI_Internal_Remote_operations;
-
-/**
- *  The following data structure defines the packet used to perform
- *  remote event operations.
- */
-typedef struct {
-  /** This field is the general header for all packets. */
-  MP_packet_Prefix                 Prefix;
-  /** This value specifies the operation. */
-  MPCI_Internal_Remote_operations  operation;
-  /** This is the maximum number of nodes in the system. It must agree
-   *  on all nodes.
-   */
-  uint32_t                         maximum_nodes;
-  /** This field is the maximum number of concurrently existent
-   *  globally offered objects.
-   */
-  uint32_t                         maximum_global_objects;
-}    MPCI_Internal_packet;
-
-/**
- *  The following thread queue is used to maintain a list of tasks
- *  which currently have outstanding remote requests.
- */
-SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
-
-/**
- *  The following define the internal pointers to the user's
- *  configuration information.
- */
-SCORE_EXTERN MPCI_Control *_MPCI_table;
-
-/**
- *  @brief Pointer to MP thread control block.
- *
- *  The following is used to determine when the multiprocessing receive
- *  thread is executing so that a proxy can be allocated instead of
- *  blocking the multiprocessing receive thread.
- */
-SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb;
-
-/**
- *  The following table contains the process packet routines provided
- *  by each object that supports MP operations.
- */
-SCORE_EXTERN MPCI_Packet_processor
-               _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1];
-
-/**
- *  @brief Initialize the MPCI handler.
- *
- *  This routine performs the initialization necessary for this handler.
- *
- *  @param[in] timeout_status is the value which should be returned to
- *             blocking threads when they timeout on a remote operation.
- */
-void _MPCI_Handler_initialization(
-  uint32_t   timeout_status
-);
-
-/**
- *  @brief Create the MPCI server thread.
- *
- *  This routine creates the packet receive server used in MP systems.
- */
-void _MPCI_Create_server( void );
-
-/**
- *  @brief Initialize the MPCI driver.
- *
- *  This routine initializes the MPCI driver by
- *  invoking the user provided MPCI initialization callout.
- */
-void _MPCI_Initialization ( void );
-
-/**
- *  This routine registers the MPCI packet processor for the
- *  designated object class.
- *
- *  @param[in] the_class is the class indicator for packets which will
- *             be processed by @a the_packet_processor method.
- *  @param[in] the_packet_processor is a pointer to a method which is
- *             invoked when packets with @a the_class are received.
- */
-void _MPCI_Register_packet_processor(
-  MP_packet_Classes      the_class,
-  MPCI_Packet_processor  the_packet_processor
-
-);
-
-/**
- *  This function obtains a packet by invoking the user provided
- *  MPCI get packet callout.
- *
- *  @retval This method returns a pointer to a MPCI packet which can be
- *          filled in by the caller and used to perform a subsequent
- *          remote operation.
- */
-MP_packet_Prefix *_MPCI_Get_packet ( void );
-
-/**
- *  @brief Deallocate a packet.
- *
- *  This routine deallocates a packet by invoking the user provided
- *  MPCI return packet callout.
- *
- *  @param[in] the_packet is the MP packet to deallocate.
- */
-void _MPCI_Return_packet (
-  MP_packet_Prefix *the_packet
-);
-
-/**
- *  @brief Send a process packet.
- *
- *  This routine sends a process packet by invoking the user provided
- *  MPCI send callout.
- *
- *  @param[in] destination is the node which should receive this packet.
- *  @param[in] the_packet is the packet to be sent.
- */
-void _MPCI_Send_process_packet (
-  uint32_t          destination,
-  MP_packet_Prefix *the_packet
-);
-
-/**
- *  @brief Send a request packet.
- *
- *  This routine sends a request packet by invoking the user provided
- *  MPCI send callout.
- *
- *  @param[in] destination is the node which should receive this packet.
- *  @param[in] the_packet is the packet to be sent.
- *  @param[in] extra_state is the extra thread state bits which should be
- *             set in addition to the remote operation pending state.  It
- *             may indicate the caller is blocking on a message queue
- *             operation.
- *
- *  @retval This method returns the operation status from the remote node.
- */
-uint32_t _MPCI_Send_request_packet (
-  uint32_t           destination,
-  MP_packet_Prefix  *the_packet,
-  States_Control     extra_state
-);
-
-/**
- *  @brief Send a response packet.
- *
- *  This routine sends a response packet by invoking the user provided
- *  MPCI send callout.
- *
- *  @param[in] destination is the node which should receive this packet.
- *  @param[in] the_packet is the packet to be sent.
- */
-void _MPCI_Send_response_packet (
-  uint32_t          destination,
-  MP_packet_Prefix *the_packet
-);
-
-/**
- *  @brief Receive a packet.
- *
- *  This routine receives a packet by invoking the user provided
- *  MPCI receive callout.
- *
- *  @retval This method returns the packet received.
- */
-MP_packet_Prefix  *_MPCI_Receive_packet ( void );
-
-/**
- *  @brief Pass a packet to the thread.
- *
- *  This routine is responsible for passing @a the_packet to the thread
- *  waiting on the remote operation to complete.  The unblocked thread is
- *  responsible for eventually freeing @a the_packet.
- *
- *  @param[in] the_packet is the response packet to be processed.
- *
- *  @retval This method returns a pointer to the thread which was if unblocked
- *          or NULL if the waiting thread no longer exists.
- */
-Thread_Control *_MPCI_Process_response (
-  MP_packet_Prefix *the_packet
-);
-
-/**
- *  @brief Receive and process all packets.
- *
- *  This is the server thread which receives and processes all MCPI packets.
- *
- *  @param[in] ignored is the thread argument.  It is not used.
- */
-Thread _MPCI_Receive_server(
-  uint32_t   ignored
-);
-
-/**
- *  @brief Announce the availability of a packet.
- *
- *  This routine informs RTEMS of the availability of an MPCI packet.
- */
-void _MPCI_Announce ( void );
-
-/**
- *  @brief Perform a process on another node.
- *
- *  This routine performs a remote procedure call so that a
- *  process operation can be performed on another node.
- *
- *  @param[in] operation is the remote operation to perform.
- */
-void _MPCI_Internal_packets_Send_process_packet (
-   MPCI_Internal_Remote_operations operation
-);
-
-/**
- *  _MPCI_Internal_packets_Send_request_packet
- *
- *  This routine performs a remote procedure call so that a
- *  directive operation can be initiated on another node.
- *
- *  This routine is not needed since there are no request
- *  packets to be sent by this manager.
- */
-
-/**
- *  _MPCI_Internal_packets_Send_response_packet
- *
- *  This routine performs a remote procedure call so that a
- *  directive can be performed on another node.
- *
- *  This routine is not needed since there are no response
- *  packets to be sent by this manager.
- */
-
-/**
- *  @brief Perform requested action from another node.
- *
- *  This routine performs the actions specific to this package for
- *  the request from another node.
- */
-void _MPCI_Internal_packets_Process_packet (
-  MP_packet_Prefix *the_packet_prefix
-);
-
-/**
- *  _MPCI_Internal_packets_Send_object_was_deleted
- *
- *  This routine is invoked indirectly by the thread queue
- *  when a proxy has been removed from the thread queue and
- *  the remote node must be informed of this.
- *
- *  This routine is not needed since there are no objects
- *  deleted by this manager.
- */
-
-/**
- *  _MPCI_Internal_packets_Send_extract_proxy
- *
- *  This routine is invoked when a task is deleted and it
- *  has a proxy which must be removed from a thread queue and
- *  the remote node must be informed of this.
- *
- *  This routine is not needed since there are no objects
- *  deleted by this manager.
- */
-
-/**
- *  @brief Obtain an internal thread.
- *
- *  This routine is used to obtain an internal threads MP packet.
- */
-MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void );
+/**@}*/
 
 #ifdef __cplusplus
 }
 #endif
 
-/**@}*/
-
 #endif
 /* end of include file */
diff --git a/cpukit/score/include/rtems/score/mpciimpl.h b/cpukit/score/include/rtems/score/mpciimpl.h
new file mode 100644
index 0000000..29a78c1
--- /dev/null
+++ b/cpukit/score/include/rtems/score/mpciimpl.h
@@ -0,0 +1,337 @@
+/**
+ * @file
+ *
+ * @ingroup ScoreMPCI
+ *
+ * @brief MPCI Layer Implementation
+ */
+
+/*
+ *  COPYRIGHT (c) 1989-2009.
+ *  On-Line Applications Research Corporation (OAR).
+ *
+ *  The license and distribution terms for this file may be
+ *  found in the file LICENSE in this distribution or at
+ *  http://www.rtems.com/license/LICENSE.
+ */
+
+#ifndef _RTEMS_SCORE_MPCIIMPL_H
+#define _RTEMS_SCORE_MPCIIMPL_H
+
+#include <rtems/score/mpci.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @addtogroup ScoreMPCI
+ *
+ * @{
+ */
+
+/**
+ *  For packets associated with requests that don't already have a timeout,
+ *  use the one specified by this MPCI driver.  The value specified by
+ *   the MPCI driver sets an upper limit on how long a remote request
+ *   should take to complete.
+ */
+#define MPCI_DEFAULT_TIMEOUT    0xFFFFFFFF
+
+/**
+ *  The following defines the type for packet processing routines
+ *  invoked by the MPCI Receive server.
+ */
+typedef void (*MPCI_Packet_processor)( MP_packet_Prefix * );
+
+/**
+ *  The following enumerated type defines the list of
+ *  internal MP operations.
+ */
+typedef enum {
+  MPCI_PACKETS_SYSTEM_VERIFY  =  0
+}   MPCI_Internal_Remote_operations;
+
+/**
+ *  The following data structure defines the packet used to perform
+ *  remote event operations.
+ */
+typedef struct {
+  /** This field is the general header for all packets. */
+  MP_packet_Prefix                 Prefix;
+  /** This value specifies the operation. */
+  MPCI_Internal_Remote_operations  operation;
+  /** This is the maximum number of nodes in the system. It must agree
+   *  on all nodes.
+   */
+  uint32_t                         maximum_nodes;
+  /** This field is the maximum number of concurrently existent
+   *  globally offered objects.
+   */
+  uint32_t                         maximum_global_objects;
+}    MPCI_Internal_packet;
+
+/**
+ *  The following thread queue is used to maintain a list of tasks
+ *  which currently have outstanding remote requests.
+ */
+SCORE_EXTERN Thread_queue_Control _MPCI_Remote_blocked_threads;
+
+/**
+ *  The following define the internal pointers to the user's
+ *  configuration information.
+ */
+SCORE_EXTERN MPCI_Control *_MPCI_table;
+
+/**
+ *  @brief Pointer to MP thread control block.
+ *
+ *  The following is used to determine when the multiprocessing receive
+ *  thread is executing so that a proxy can be allocated instead of
+ *  blocking the multiprocessing receive thread.
+ */
+SCORE_EXTERN Thread_Control *_MPCI_Receive_server_tcb;
+
+/**
+ *  The following table contains the process packet routines provided
+ *  by each object that supports MP operations.
+ */
+SCORE_EXTERN MPCI_Packet_processor
+               _MPCI_Packet_processors[MP_PACKET_CLASSES_LAST+1];
+
+/**
+ *  @brief Initialize the MPCI handler.
+ *
+ *  This routine performs the initialization necessary for this handler.
+ *
+ *  @param[in] timeout_status is the value which should be returned to
+ *             blocking threads when they timeout on a remote operation.
+ */
+void _MPCI_Handler_initialization(
+  uint32_t   timeout_status
+);
+
+/**
+ *  @brief Create the MPCI server thread.
+ *
+ *  This routine creates the packet receive server used in MP systems.
+ */
+void _MPCI_Create_server( void );
+
+/**
+ *  @brief Initialize the MPCI driver.
+ *
+ *  This routine initializes the MPCI driver by
+ *  invoking the user provided MPCI initialization callout.
+ */
+void _MPCI_Initialization ( void );
+
+/**
+ *  This routine registers the MPCI packet processor for the
+ *  designated object class.
+ *
+ *  @param[in] the_class is the class indicator for packets which will
+ *             be processed by @a the_packet_processor method.
+ *  @param[in] the_packet_processor is a pointer to a method which is
+ *             invoked when packets with @a the_class are received.
+ */
+void _MPCI_Register_packet_processor(
+  MP_packet_Classes      the_class,
+  MPCI_Packet_processor  the_packet_processor
+
+);
+
+/**
+ *  This function obtains a packet by invoking the user provided
+ *  MPCI get packet callout.
+ *
+ *  @retval This method returns a pointer to a MPCI packet which can be
+ *          filled in by the caller and used to perform a subsequent
+ *          remote operation.
+ */
+MP_packet_Prefix *_MPCI_Get_packet ( void );
+
+/**
+ *  @brief Deallocate a packet.
+ *
+ *  This routine deallocates a packet by invoking the user provided
+ *  MPCI return packet callout.
+ *
+ *  @param[in] the_packet is the MP packet to deallocate.
+ */
+void _MPCI_Return_packet (
+  MP_packet_Prefix *the_packet
+);
+
+/**
+ *  @brief Send a process packet.
+ *
+ *  This routine sends a process packet by invoking the user provided
+ *  MPCI send callout.
+ *
+ *  @param[in] destination is the node which should receive this packet.
+ *  @param[in] the_packet is the packet to be sent.
+ */
+void _MPCI_Send_process_packet (
+  uint32_t          destination,
+  MP_packet_Prefix *the_packet
+);
+
+/**
+ *  @brief Send a request packet.
+ *
+ *  This routine sends a request packet by invoking the user provided
+ *  MPCI send callout.
+ *
+ *  @param[in] destination is the node which should receive this packet.
+ *  @param[in] the_packet is the packet to be sent.
+ *  @param[in] extra_state is the extra thread state bits which should be
+ *             set in addition to the remote operation pending state.  It
+ *             may indicate the caller is blocking on a message queue
+ *             operation.
+ *
+ *  @retval This method returns the operation status from the remote node.
+ */
+uint32_t _MPCI_Send_request_packet (
+  uint32_t           destination,
+  MP_packet_Prefix  *the_packet,
+  States_Control     extra_state
+);
+
+/**
+ *  @brief Send a response packet.
+ *
+ *  This routine sends a response packet by invoking the user provided
+ *  MPCI send callout.
+ *
+ *  @param[in] destination is the node which should receive this packet.
+ *  @param[in] the_packet is the packet to be sent.
+ */
+void _MPCI_Send_response_packet (
+  uint32_t          destination,
+  MP_packet_Prefix *the_packet
+);
+
+/**
+ *  @brief Receive a packet.
+ *
+ *  This routine receives a packet by invoking the user provided
+ *  MPCI receive callout.
+ *
+ *  @retval This method returns the packet received.
+ */
+MP_packet_Prefix  *_MPCI_Receive_packet ( void );
+
+/**
+ *  @brief Pass a packet to the thread.
+ *
+ *  This routine is responsible for passing @a the_packet to the thread
+ *  waiting on the remote operation to complete.  The unblocked thread is
+ *  responsible for eventually freeing @a the_packet.
+ *
+ *  @param[in] the_packet is the response packet to be processed.
+ *
+ *  @retval This method returns a pointer to the thread which was if unblocked
+ *          or NULL if the waiting thread no longer exists.
+ */
+Thread_Control *_MPCI_Process_response (
+  MP_packet_Prefix *the_packet
+);
+
+/**
+ *  @brief Receive and process all packets.
+ *
+ *  This is the server thread which receives and processes all MCPI packets.
+ *
+ *  @param[in] ignored is the thread argument.  It is not used.
+ */
+Thread _MPCI_Receive_server(
+  uint32_t   ignored
+);
+
+/**
+ *  @brief Announce the availability of a packet.
+ *
+ *  This routine informs RTEMS of the availability of an MPCI packet.
+ */
+void _MPCI_Announce ( void );
+
+/**
+ *  @brief Perform a process on another node.
+ *
+ *  This routine performs a remote procedure call so that a
+ *  process operation can be performed on another node.
+ *
+ *  @param[in] operation is the remote operation to perform.
+ */
+void _MPCI_Internal_packets_Send_process_packet (
+   MPCI_Internal_Remote_operations operation
+);
+
+/**
+ *  _MPCI_Internal_packets_Send_request_packet
+ *
+ *  This routine performs a remote procedure call so that a
+ *  directive operation can be initiated on another node.
+ *
+ *  This routine is not needed since there are no request
+ *  packets to be sent by this manager.
+ */
+
+/**
+ *  _MPCI_Internal_packets_Send_response_packet
+ *
+ *  This routine performs a remote procedure call so that a
+ *  directive can be performed on another node.
+ *
+ *  This routine is not needed since there are no response
+ *  packets to be sent by this manager.
+ */
+
+/**
+ *  @brief Perform requested action from another node.
+ *
+ *  This routine performs the actions specific to this package for
+ *  the request from another node.
+ */
+void _MPCI_Internal_packets_Process_packet (
+  MP_packet_Prefix *the_packet_prefix
+);
+
+/**
+ *  _MPCI_Internal_packets_Send_object_was_deleted
+ *
+ *  This routine is invoked indirectly by the thread queue
+ *  when a proxy has been removed from the thread queue and
+ *  the remote node must be informed of this.
+ *
+ *  This routine is not needed since there are no objects
+ *  deleted by this manager.
+ */
+
+/**
+ *  _MPCI_Internal_packets_Send_extract_proxy
+ *
+ *  This routine is invoked when a task is deleted and it
+ *  has a proxy which must be removed from a thread queue and
+ *  the remote node must be informed of this.
+ *
+ *  This routine is not needed since there are no objects
+ *  deleted by this manager.
+ */
+
+/**
+ *  @brief Obtain an internal thread.
+ *
+ *  This routine is used to obtain an internal threads MP packet.
+ */
+MPCI_Internal_packet *_MPCI_Internal_packets_Get_packet ( void );
+
+/**@}*/
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
+/* end of include file */
diff --git a/cpukit/score/include/rtems/score/threadmp.h b/cpukit/score/include/rtems/score/threadmp.h
index 1fa0df7..daa68a1 100644
--- a/cpukit/score/include/rtems/score/threadmp.h
+++ b/cpukit/score/include/rtems/score/threadmp.h
@@ -23,7 +23,7 @@
 # error "Never use <rtems/score/threadmp.h> directly; include <rtems/score/threadimpl.h> instead."
 #endif
 
-#include <rtems/score/mpci.h>
+#include <rtems/score/mpciimpl.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/cpukit/score/preinstall.am b/cpukit/score/preinstall.am
index d2a4a9a..fc3b785 100644
--- a/cpukit/score/preinstall.am
+++ b/cpukit/score/preinstall.am
@@ -314,6 +314,10 @@ $(PROJECT_INCLUDE)/rtems/score/mpci.h: include/rtems/score/mpci.h $(PROJECT_INCL
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/mpci.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/mpci.h
 
+$(PROJECT_INCLUDE)/rtems/score/mpciimpl.h: include/rtems/score/mpciimpl.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/mpciimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/mpciimpl.h
+
 $(PROJECT_INCLUDE)/rtems/score/mppkt.h: include/rtems/score/mppkt.h $(PROJECT_INCLUDE)/rtems/score/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/score/mppkt.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/score/mppkt.h
diff --git a/cpukit/score/src/mpci.c b/cpukit/score/src/mpci.c
index 9e00971..c8cf6bd 100644
--- a/cpukit/score/src/mpci.c
+++ b/cpukit/score/src/mpci.c
@@ -18,21 +18,13 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#if defined(RTEMS_MULTIPROCESSING)
-#include <rtems/score/mpci.h>
-#include <rtems/score/mppkt.h>
-#endif
-#include <rtems/config.h>
-#include <rtems/score/cpu.h>
+#include <rtems/score/mpciimpl.h>
+#include <rtems/score/coresemimpl.h>
 #include <rtems/score/interr.h>
-#include <rtems/score/threadimpl.h>
-#include <rtems/score/threadqimpl.h>
 #include <rtems/score/stackimpl.h>
-#include <rtems/score/watchdog.h>
 #include <rtems/score/sysstate.h>
-
-#include <rtems/score/coresemimpl.h>
+#include <rtems/score/threadimpl.h>
+#include <rtems/score/threadqimpl.h>
 #include <rtems/config.h>
 
 RTEMS_STATIC_ASSERT(
diff --git a/cpukit/score/src/threadmp.c b/cpukit/score/src/threadmp.c
index b33dad5..1ab899b 100644
--- a/cpukit/score/src/threadmp.c
+++ b/cpukit/score/src/threadmp.c
@@ -18,12 +18,9 @@
 #include "config.h"
 #endif
 
-#include <rtems/system.h>
-#include <rtems/score/priority.h>
 #include <rtems/score/threadimpl.h>
-#include <rtems/score/mpci.h>
+#include <rtems/score/isrlevel.h>
 #include <rtems/score/wkspace.h>
-#include <rtems/score/isr.h>
 
 void _Thread_MP_Handler_initialization (
   uint32_t    maximum_proxies
diff --git a/testsuites/sptests/spsize/size.c b/testsuites/sptests/spsize/size.c
index 6bca2eb..77f161f 100644
--- a/testsuites/sptests/spsize/size.c
+++ b/testsuites/sptests/spsize/size.c
@@ -31,7 +31,7 @@
 #include <rtems/rtems/messageimpl.h>
 #if defined(RTEMS_MULTIPROCESSING)
 #include <rtems/rtems/mp.h>
-#include <rtems/score/mpci.h>
+#include <rtems/score/mpciimpl.h>
 #endif
 #include <rtems/rtems/partimpl.h>
 #include <rtems/score/priority.h>
@@ -304,7 +304,7 @@ uninitialized =
 #endif
 
 #if defined(RTEMS_MULTIPROCESSING)
-/*mpci.h*/      (sizeof _MPCI_Remote_blocked_threads)     +
+/*mpciimpl.h*/  (sizeof _MPCI_Remote_blocked_threads)     +
                 (sizeof _MPCI_Semaphore)                  +
                 (sizeof _MPCI_table)                      +
                 (sizeof _MPCI_Receive_server_tcb)         +




More information about the vc mailing list