summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-12-29 17:43:46 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2020-01-02 09:26:59 +0100
commit453bb4b64225afd3040badb632f7b4adedc816cd (patch)
tree0af90349c5b4a533b55b04205d48b41da8022c94 /cpukit/rtems
parentscore: Fix objects node initialization (diff)
downloadrtems-453bb4b64225afd3040badb632f7b4adedc816cd.tar.bz2
rtems: Fix MPCI initialization
Update #2408.
Diffstat (limited to 'cpukit/rtems')
-rw-r--r--cpukit/rtems/src/eventseize.c6
-rw-r--r--cpukit/rtems/src/msgmp.c23
-rw-r--r--cpukit/rtems/src/msgqcreate.c16
-rw-r--r--cpukit/rtems/src/partcreate.c14
-rw-r--r--cpukit/rtems/src/partmp.c23
-rw-r--r--cpukit/rtems/src/semcreate.c9
-rw-r--r--cpukit/rtems/src/semmp.c22
-rw-r--r--cpukit/rtems/src/signalcatch.c6
-rw-r--r--cpukit/rtems/src/taskcreate.c9
-rw-r--r--cpukit/rtems/src/taskmp.c31
10 files changed, 71 insertions, 88 deletions
diff --git a/cpukit/rtems/src/eventseize.c b/cpukit/rtems/src/eventseize.c
index 0d6097906c..f07a62b7c0 100644
--- a/cpukit/rtems/src/eventseize.c
+++ b/cpukit/rtems/src/eventseize.c
@@ -101,14 +101,14 @@ rtems_status_code _Event_Seize(
}
#if defined(RTEMS_MULTIPROCESSING)
-static void _Event_Manager_initialization( void )
+static void _Event_MP_Initialize( void )
{
_MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet );
}
RTEMS_SYSINIT_ITEM(
- _Event_Manager_initialization,
- RTEMS_SYSINIT_CLASSIC_EVENT,
+ _Event_MP_Initialize,
+ RTEMS_SYSINIT_CLASSIC_EVENT_MP,
RTEMS_SYSINIT_ORDER_MIDDLE
);
#endif
diff --git a/cpukit/rtems/src/msgmp.c b/cpukit/rtems/src/msgmp.c
index 6ec6982fcb..78a7c7cd84 100644
--- a/cpukit/rtems/src/msgmp.c
+++ b/cpukit/rtems/src/msgmp.c
@@ -24,6 +24,7 @@
#include <rtems/score/coremsgimpl.h>
#include <rtems/score/statesimpl.h>
#include <rtems/score/threadimpl.h>
+#include <rtems/sysinit.h>
RTEMS_STATIC_ASSERT(
MESSAGE_QUEUE_MP_PACKET_SIZE <= MP_PACKET_MINIMUM_PACKET_SIZE,
@@ -361,13 +362,7 @@ static void _Message_queue_MP_Send_response_packet (
}
}
-/*
- *
- * _Message_queue_MP_Process_packet
- *
- */
-
-void _Message_queue_MP_Process_packet (
+static void _Message_queue_MP_Process_packet (
rtems_packet_prefix *the_packet_prefix
)
{
@@ -590,4 +585,16 @@ void _Message_queue_Core_message_queue_mp_support(
);
}
-/* end of file */
+static void _Message_queue_MP_Initialize( void )
+{
+ _MPCI_Register_packet_processor(
+ MP_PACKET_MESSAGE_QUEUE,
+ _Message_queue_MP_Process_packet
+ );
+}
+
+RTEMS_SYSINIT_ITEM(
+ _Message_queue_MP_Initialize,
+ RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE_MP,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/cpukit/rtems/src/msgqcreate.c b/cpukit/rtems/src/msgqcreate.c
index 2925d244a7..7054873774 100644
--- a/cpukit/rtems/src/msgqcreate.c
+++ b/cpukit/rtems/src/msgqcreate.c
@@ -144,21 +144,9 @@ rtems_status_code rtems_message_queue_create(
return RTEMS_SUCCESSFUL;
}
-static void _Message_queue_Manager_initialization(void)
+static void _Message_queue_Manager_initialization( void )
{
- _Objects_Initialize_information( &_Message_queue_Information);
-
- /*
- * Register the MP Process Packet routine.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor(
- MP_PACKET_MESSAGE_QUEUE,
- _Message_queue_MP_Process_packet
- );
-#endif
-
+ _Objects_Initialize_information( &_Message_queue_Information);
}
RTEMS_SYSINIT_ITEM(
diff --git a/cpukit/rtems/src/partcreate.c b/cpukit/rtems/src/partcreate.c
index 99d0d59b37..ccbae77c85 100644
--- a/cpukit/rtems/src/partcreate.c
+++ b/cpukit/rtems/src/partcreate.c
@@ -116,21 +116,9 @@ rtems_status_code rtems_partition_create(
return RTEMS_SUCCESSFUL;
}
-static void _Partition_Manager_initialization(void)
+static void _Partition_Manager_initialization( void )
{
_Objects_Initialize_information( &_Partition_Information );
-
- /*
- * Register the MP Process Packet routine.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor(
- MP_PACKET_PARTITION,
- _Partition_MP_Process_packet
- );
-#endif
-
}
RTEMS_SYSINIT_ITEM(
diff --git a/cpukit/rtems/src/partmp.c b/cpukit/rtems/src/partmp.c
index c613ce2c18..b22b2443e1 100644
--- a/cpukit/rtems/src/partmp.c
+++ b/cpukit/rtems/src/partmp.c
@@ -23,6 +23,7 @@
#include <rtems/score/statesimpl.h>
#include <rtems/score/threadimpl.h>
#include <rtems/score/threadqimpl.h>
+#include <rtems/sysinit.h>
RTEMS_STATIC_ASSERT(
sizeof(Partition_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
@@ -206,13 +207,7 @@ static void _Partition_MP_Send_response_packet (
}
}
-/*
- *
- * _Partition_MP_Process_packet
- *
- */
-
-void _Partition_MP_Process_packet (
+static void _Partition_MP_Process_packet(
rtems_packet_prefix *the_packet_prefix
)
{
@@ -326,4 +321,16 @@ void _Partition_MP_Send_extract_proxy (
}
-/* end of file */
+static void _Partition_MP_Initialize( void )
+{
+ _MPCI_Register_packet_processor(
+ MP_PACKET_PARTITION,
+ _Partition_MP_Process_packet
+ );
+}
+
+RTEMS_SYSINIT_ITEM(
+ _Partition_MP_Initialize,
+ RTEMS_SYSINIT_CLASSIC_PARTITION_MP,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/cpukit/rtems/src/semcreate.c b/cpukit/rtems/src/semcreate.c
index 81a968107f..41578561be 100644
--- a/cpukit/rtems/src/semcreate.c
+++ b/cpukit/rtems/src/semcreate.c
@@ -267,16 +267,9 @@ rtems_status_code rtems_semaphore_create(
return RTEMS_SUCCESSFUL;
}
-static void _Semaphore_Manager_initialization(void)
+static void _Semaphore_Manager_initialization( void )
{
_Objects_Initialize_information( &_Semaphore_Information );
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor(
- MP_PACKET_SEMAPHORE,
- _Semaphore_MP_Process_packet
- );
-#endif
}
RTEMS_SYSINIT_ITEM(
diff --git a/cpukit/rtems/src/semmp.c b/cpukit/rtems/src/semmp.c
index f6a55259b4..0246e1fb0b 100644
--- a/cpukit/rtems/src/semmp.c
+++ b/cpukit/rtems/src/semmp.c
@@ -21,6 +21,7 @@
#include <rtems/rtems/semimpl.h>
#include <rtems/rtems/optionsimpl.h>
#include <rtems/rtems/statusimpl.h>
+#include <rtems/sysinit.h>
RTEMS_STATIC_ASSERT(
sizeof(Semaphore_MP_Packet) <= MP_PACKET_MINIMUM_PACKET_SIZE,
@@ -187,7 +188,7 @@ static void _Semaphore_MP_Send_response_packet (
}
}
-void _Semaphore_MP_Process_packet (
+static void _Semaphore_MP_Process_packet (
rtems_packet_prefix *the_packet_prefix
)
{
@@ -295,7 +296,6 @@ void _Semaphore_MP_Send_extract_proxy (
}
-#if defined(RTEMS_MULTIPROCESSING)
void _Semaphore_Core_mutex_mp_support (
Thread_Control *the_thread,
Objects_Id id
@@ -309,9 +309,7 @@ void _Semaphore_Core_mutex_mp_support (
the_thread
);
}
-#endif
-#if defined(RTEMS_MULTIPROCESSING)
void _Semaphore_Core_semaphore_mp_support (
Thread_Control *the_thread,
Objects_Id id
@@ -325,5 +323,17 @@ void _Semaphore_Core_semaphore_mp_support (
the_thread
);
}
-#endif
-/* end of file */
+
+static void _Semaphore_MP_Initialize( void )
+{
+ _MPCI_Register_packet_processor(
+ MP_PACKET_SEMAPHORE,
+ _Semaphore_MP_Process_packet
+ );
+}
+
+RTEMS_SYSINIT_ITEM(
+ _Semaphore_MP_Initialize,
+ RTEMS_SYSINIT_CLASSIC_SEMAPHORE_MP,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
diff --git a/cpukit/rtems/src/signalcatch.c b/cpukit/rtems/src/signalcatch.c
index 03c2b976d3..63efa5cb5f 100644
--- a/cpukit/rtems/src/signalcatch.c
+++ b/cpukit/rtems/src/signalcatch.c
@@ -89,7 +89,7 @@ rtems_status_code rtems_signal_catch(
}
#if defined(RTEMS_MULTIPROCESSING)
-static void _Signal_Manager_initialization( void )
+static void _Signal_MP_Initialize( void )
{
_MPCI_Register_packet_processor(
MP_PACKET_SIGNAL,
@@ -98,8 +98,8 @@ static void _Signal_Manager_initialization( void )
}
RTEMS_SYSINIT_ITEM(
- _Signal_Manager_initialization,
- RTEMS_SYSINIT_CLASSIC_SIGNAL,
+ _Signal_MP_Initialize,
+ RTEMS_SYSINIT_CLASSIC_SIGNAL_MP,
RTEMS_SYSINIT_ORDER_MIDDLE
);
#endif
diff --git a/cpukit/rtems/src/taskcreate.c b/cpukit/rtems/src/taskcreate.c
index 4055e1eb50..e27b82ced4 100644
--- a/cpukit/rtems/src/taskcreate.c
+++ b/cpukit/rtems/src/taskcreate.c
@@ -242,17 +242,10 @@ static User_extensions_Control _RTEMS_tasks_User_extensions = {
}
};
-static void _RTEMS_tasks_Manager_initialization(void)
+static void _RTEMS_tasks_Manager_initialization( void )
{
_Thread_Initialize_information( &_RTEMS_tasks_Information );
_User_extensions_Add_API_set( &_RTEMS_tasks_User_extensions );
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor(
- MP_PACKET_TASKS,
- _RTEMS_tasks_MP_Process_packet
- );
-#endif
}
RTEMS_SYSINIT_ITEM(
diff --git a/cpukit/rtems/src/taskmp.c b/cpukit/rtems/src/taskmp.c
index e3742c528d..d929c350b2 100644
--- a/cpukit/rtems/src/taskmp.c
+++ b/cpukit/rtems/src/taskmp.c
@@ -24,6 +24,7 @@
#include <rtems/score/statesimpl.h>
#include <rtems/score/threadimpl.h>
#include <rtems/score/threadqimpl.h>
+#include <rtems/sysinit.h>
/**
* The following data structure defines the packet used to perform
@@ -221,7 +222,7 @@ static void _RTEMS_tasks_MP_Send_response_packet (
*
*/
-void _RTEMS_tasks_MP_Process_packet (
+static void _RTEMS_tasks_MP_Process_packet (
rtems_packet_prefix *the_packet_prefix
)
{
@@ -312,20 +313,16 @@ void _RTEMS_tasks_MP_Process_packet (
}
}
-/*
- * _RTEMS_tasks_MP_Send_object_was_deleted
- *
- * This routine is not neededby the Tasks since a task
- * cannot be globally deleted.
- *
- */
-
-/*
- * _RTEMS_tasks_MP_Send_extract_proxy
- *
- * This routine is not neededby the Tasks since a task
- * cannot be globally deleted.
- *
- */
+static void _RTEMS_tasks_MP_Initialize( void )
+{
+ _MPCI_Register_packet_processor(
+ MP_PACKET_TASKS,
+ _RTEMS_tasks_MP_Process_packet
+ );
+}
-/* end of file */
+RTEMS_SYSINIT_ITEM(
+ _RTEMS_tasks_MP_Initialize,
+ RTEMS_SYSINIT_CLASSIC_TASKS_MP,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);