summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-12-14 14:59:56 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-03 10:00:52 +0100
commitae85b0663eb19db435476d268a10187633f2ba56 (patch)
tree4696bcfaa9ccf2f07f2047853a7df56f7e36ea36
parentOptional Classic Signal initialization (diff)
downloadrtems-ae85b0663eb19db435476d268a10187633f2ba56.tar.bz2
Optional Classic Event initialization
Update #2408.
-rw-r--r--cpukit/rtems/Makefile.am1
-rw-r--r--cpukit/rtems/include/rtems/rtems/eventimpl.h12
-rw-r--r--cpukit/rtems/src/event.c32
-rw-r--r--cpukit/rtems/src/eventseize.c14
-rw-r--r--cpukit/sapi/src/rtemsapi.c2
-rw-r--r--cpukit/score/include/rtems/sysinit.h1
-rw-r--r--testsuites/sptests/spsysinit01/init.c13
7 files changed, 28 insertions, 47 deletions
diff --git a/cpukit/rtems/Makefile.am b/cpukit/rtems/Makefile.am
index 211aef4e6a..6c87b94a75 100644
--- a/cpukit/rtems/Makefile.am
+++ b/cpukit/rtems/Makefile.am
@@ -199,7 +199,6 @@ librtems_a_SOURCES += src/semdata.c
librtems_a_SOURCES += src/semsetpriority.c
## EVENT_C_FILES
-librtems_a_SOURCES += src/event.c
librtems_a_SOURCES += src/eventreceive.c
librtems_a_SOURCES += src/eventseize.c
librtems_a_SOURCES += src/eventsend.c
diff --git a/cpukit/rtems/include/rtems/rtems/eventimpl.h b/cpukit/rtems/include/rtems/rtems/eventimpl.h
index 460b7ce90d..f4850d2fb8 100644
--- a/cpukit/rtems/include/rtems/rtems/eventimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/eventimpl.h
@@ -44,18 +44,6 @@ extern "C" {
*/
#define EVENT_SETS_NONE_PENDING 0
-/**
- * @brief Event Manager Initialization
- *
- * Event Manager
- *
- * This routine performs the initialization necessary for this manager.
- *
- * - INTERRUPT LATENCY:
- * + single case
- */
-void _Event_Manager_initialization( void );
-
void _Event_Seize(
rtems_event_set event_in,
rtems_option option_set,
diff --git a/cpukit/rtems/src/event.c b/cpukit/rtems/src/event.c
deleted file mode 100644
index 7ec44d741d..0000000000
--- a/cpukit/rtems/src/event.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/**
- * @file
- *
- * @brief Event Manager Initialization
- * @ingroup ClassicEvent
- */
-
-/*
- * COPYRIGHT (c) 1989-2008.
- * 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.org/license/LICENSE.
- */
-
-#if HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/rtems/eventimpl.h>
-
-void _Event_Manager_initialization( void )
-{
- /*
- * Register the MP Process Packet routine.
- */
-
-#if defined(RTEMS_MULTIPROCESSING)
- _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet );
-#endif
-}
diff --git a/cpukit/rtems/src/eventseize.c b/cpukit/rtems/src/eventseize.c
index 9c41b777f9..3dc554f61b 100644
--- a/cpukit/rtems/src/eventseize.c
+++ b/cpukit/rtems/src/eventseize.c
@@ -18,6 +18,7 @@
#include "config.h"
#endif
+#include <rtems/sysinit.h>
#include <rtems/rtems/eventimpl.h>
#include <rtems/rtems/optionsimpl.h>
#include <rtems/score/threadimpl.h>
@@ -118,3 +119,16 @@ void _Event_Seize(
_Thread_Dispatch_enable( cpu_self );
}
+
+#if defined(RTEMS_MULTIPROCESSING)
+static void _Event_Manager_initialization( void )
+{
+ _MPCI_Register_packet_processor( MP_PACKET_EVENT, _Event_MP_Process_packet );
+}
+
+RTEMS_SYSINIT_ITEM(
+ _Event_Manager_initialization,
+ RTEMS_SYSINIT_CLASSIC_EVENT,
+ RTEMS_SYSINIT_ORDER_MIDDLE
+);
+#endif
diff --git a/cpukit/sapi/src/rtemsapi.c b/cpukit/sapi/src/rtemsapi.c
index a5da72cc85..3a6005a6c0 100644
--- a/cpukit/sapi/src/rtemsapi.c
+++ b/cpukit/sapi/src/rtemsapi.c
@@ -29,7 +29,6 @@
#include <rtems/rtems/barrierimpl.h>
#include <rtems/rtems/clock.h>
#include <rtems/rtems/dpmemimpl.h>
-#include <rtems/rtems/eventimpl.h>
#include <rtems/rtems/messageimpl.h>
#include <rtems/rtems/partimpl.h>
#include <rtems/rtems/ratemonimpl.h>
@@ -38,7 +37,6 @@
void _RTEMS_API_Initialize(void)
{
- _Event_Manager_initialization();
_Message_queue_Manager_initialization();
_Semaphore_Manager_initialization();
_Partition_Manager_initialization();
diff --git a/cpukit/score/include/rtems/sysinit.h b/cpukit/score/include/rtems/sysinit.h
index 6351e12106..a5013e2a65 100644
--- a/cpukit/score/include/rtems/sysinit.h
+++ b/cpukit/score/include/rtems/sysinit.h
@@ -34,6 +34,7 @@ extern "C" {
#define RTEMS_SYSINIT_CLASSIC_TASKS 000340
#define RTEMS_SYSINIT_CLASSIC_TIMER 000341
#define RTEMS_SYSINIT_CLASSIC_SIGNAL 000342
+#define RTEMS_SYSINIT_CLASSIC_EVENT 000343
#define RTEMS_SYSINIT_IDLE_THREADS 000380
#define RTEMS_SYSINIT_BSP_LIBC 000400
#define RTEMS_SYSINIT_BEFORE_DRIVERS 000500
diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c
index f7c3073452..00eae4bbdc 100644
--- a/testsuites/sptests/spsysinit01/init.c
+++ b/testsuites/sptests/spsysinit01/init.c
@@ -51,6 +51,8 @@ typedef enum {
CLASSIC_TIMER_POST,
CLASSIC_SIGNAL_PRE,
CLASSIC_SIGNAL_POST,
+ CLASSIC_EVENT_PRE,
+ CLASSIC_EVENT_POST,
IDLE_THREADS_PRE,
IDLE_THREADS_POST,
BSP_LIBC_PRE,
@@ -191,6 +193,17 @@ LAST(RTEMS_SYSINIT_CLASSIC_SIGNAL)
next_step(CLASSIC_SIGNAL_POST);
}
+FIRST(RTEMS_SYSINIT_CLASSIC_EVENT)
+{
+ /* There is nothing to do in case RTEMS_MULTIPROCESSING is not defined */
+ next_step(CLASSIC_EVENT_PRE);
+}
+
+LAST(RTEMS_SYSINIT_CLASSIC_EVENT)
+{
+ next_step(CLASSIC_EVENT_POST);
+}
+
FIRST(RTEMS_SYSINIT_IDLE_THREADS)
{
assert(_System_state_Is_before_initialization(_System_state_Get()));