summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/semmp.c
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/src/semmp.c
parentscore: Fix objects node initialization (diff)
downloadrtems-453bb4b64225afd3040badb632f7b4adedc816cd.tar.bz2
rtems: Fix MPCI initialization
Update #2408.
Diffstat (limited to 'cpukit/rtems/src/semmp.c')
-rw-r--r--cpukit/rtems/src/semmp.c22
1 files changed, 16 insertions, 6 deletions
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
+);