summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-12-14 15:05:47 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-03 10:00:53 +0100
commitcbaac1f7f4b3d78673abfde9bd6ed7e43dddf12c (patch)
tree3aaafa8bebc23c6ae79f43a1d01fa927b2d66f8f /testsuites
parentOptional Classic Message Queue initialization (diff)
downloadrtems-cbaac1f7f4b3d78673abfde9bd6ed7e43dddf12c.tar.bz2
Optional Classic Semaphore initialization
Update #2408.
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/sptests/spsysinit01/init.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c
index 753218edf5..f9d270176a 100644
--- a/testsuites/sptests/spsysinit01/init.c
+++ b/testsuites/sptests/spsysinit01/init.c
@@ -26,6 +26,7 @@
#include <rtems/extensionimpl.h>
#include <rtems/rtems/messageimpl.h>
+#include <rtems/rtems/semimpl.h>
#include <rtems/rtems/tasksimpl.h>
#include <rtems/rtems/timerimpl.h>
#include <rtems/score/apimutex.h>
@@ -56,6 +57,8 @@ typedef enum {
CLASSIC_EVENT_POST,
CLASSIC_MESSAGE_QUEUE_PRE,
CLASSIC_MESSAGE_QUEUE_POST,
+ CLASSIC_SEMAPHORE_PRE,
+ CLASSIC_SEMAPHORE_POST,
IDLE_THREADS_PRE,
IDLE_THREADS_POST,
BSP_LIBC_PRE,
@@ -219,6 +222,18 @@ LAST(RTEMS_SYSINIT_CLASSIC_MESSAGE_QUEUE)
next_step(CLASSIC_MESSAGE_QUEUE_POST);
}
+FIRST(RTEMS_SYSINIT_CLASSIC_SEMAPHORE)
+{
+ assert(_Semaphore_Information.maximum == 0);
+ next_step(CLASSIC_SEMAPHORE_PRE);
+}
+
+LAST(RTEMS_SYSINIT_CLASSIC_SEMAPHORE)
+{
+ assert(_Semaphore_Information.maximum != 0);
+ next_step(CLASSIC_SEMAPHORE_POST);
+}
+
FIRST(RTEMS_SYSINIT_IDLE_THREADS)
{
assert(_System_state_Is_before_initialization(_System_state_Get()));
@@ -306,6 +321,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
+#define CONFIGURE_MAXIMUM_SEMAPHORES 1
+
#define CONFIGURE_MAXIMUM_TASKS 1
#define CONFIGURE_MAXIMUM_TIMERS 1