summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-12-14 16:34:50 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2016-02-03 10:00:55 +0100
commit2189b3e963f7e43e9fc577ab4f24c952cef5b08e (patch)
treec8766c8417fcb06105f4e9736b6eeeb0974d315f /testsuites
parentOptional POSIX Message Queue initialization (diff)
downloadrtems-2189b3e963f7e43e9fc577ab4f24c952cef5b08e.tar.bz2
Optional POSIX 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 9e97fdb1fb..6854d7025a 100644
--- a/testsuites/sptests/spsysinit01/init.c
+++ b/testsuites/sptests/spsysinit01/init.c
@@ -33,6 +33,7 @@
#include <rtems/posix/muteximpl.h>
#include <rtems/posix/psignalimpl.h>
#include <rtems/posix/pthreadimpl.h>
+#include <rtems/posix/semaphoreimpl.h>
#endif /* RTEMS_POSIX_API */
#include <rtems/rtems/barrierimpl.h>
#include <rtems/rtems/dpmemimpl.h>
@@ -95,6 +96,8 @@ typedef enum {
POSIX_MUTEX_POST,
POSIX_MESSAGE_QUEUE_PRE,
POSIX_MESSAGE_QUEUE_POST,
+ POSIX_SEMAPHORE_PRE,
+ POSIX_SEMAPHORE_POST,
POSIX_CLEANUP_PRE,
POSIX_CLEANUP_POST,
#endif /* RTEMS_POSIX_API */
@@ -407,6 +410,18 @@ LAST(RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE)
next_step(POSIX_MESSAGE_QUEUE_POST);
}
+FIRST(RTEMS_SYSINIT_POSIX_SEMAPHORE)
+{
+ assert(_POSIX_Semaphore_Information.maximum == 0);
+ next_step(POSIX_SEMAPHORE_PRE);
+}
+
+LAST(RTEMS_SYSINIT_POSIX_SEMAPHORE)
+{
+ assert(_POSIX_Semaphore_Information.maximum != 0);
+ next_step(POSIX_SEMAPHORE_POST);
+}
+
static size_t user_extensions_pre_posix_cleanup;
FIRST(RTEMS_SYSINIT_POSIX_CLEANUP)
@@ -542,6 +557,8 @@ static void Init(rtems_task_argument arg)
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
+#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1
+
#define CONFIGURE_MAXIMUM_POSIX_THREADS 1
#endif /* RTEMS_POSIX_API */