diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2015-12-14 16:39:10 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-02-03 10:00:56 +0100 |
commit | 76a8328945bdefafc255d9589d4dcc371e1a73ef (patch) | |
tree | e9777ee6e56ef66e47906e23532ae05f6f35316d /testsuites | |
parent | Optional POSIX Barrier initialization (diff) | |
download | rtems-76a8328945bdefafc255d9589d4dcc371e1a73ef.tar.bz2 |
Optional POSIX RWLock initialization
Update #2408.
Diffstat (limited to 'testsuites')
-rw-r--r-- | testsuites/sptests/spsysinit01/init.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c index c8135cd648..e5d6dc9fc4 100644 --- a/testsuites/sptests/spsysinit01/init.c +++ b/testsuites/sptests/spsysinit01/init.c @@ -34,6 +34,7 @@ #include <rtems/posix/muteximpl.h> #include <rtems/posix/psignalimpl.h> #include <rtems/posix/pthreadimpl.h> +#include <rtems/posix/rwlockimpl.h> #include <rtems/posix/semaphoreimpl.h> #include <rtems/posix/timerimpl.h> #endif /* RTEMS_POSIX_API */ @@ -104,6 +105,8 @@ typedef enum { POSIX_TIMER_POST, POSIX_BARRIER_PRE, POSIX_BARRIER_POST, + POSIX_RWLOCK_PRE, + POSIX_RWLOCK_POST, POSIX_CLEANUP_PRE, POSIX_CLEANUP_POST, #endif /* RTEMS_POSIX_API */ @@ -452,6 +455,18 @@ LAST(RTEMS_SYSINIT_POSIX_BARRIER) next_step(POSIX_BARRIER_POST); } +FIRST(RTEMS_SYSINIT_POSIX_RWLOCK) +{ + assert(_POSIX_RWLock_Information.maximum == 0); + next_step(POSIX_RWLOCK_PRE); +} + +LAST(RTEMS_SYSINIT_POSIX_RWLOCK) +{ + assert(_POSIX_RWLock_Information.maximum != 0); + next_step(POSIX_RWLOCK_POST); +} + static size_t user_extensions_pre_posix_cleanup; FIRST(RTEMS_SYSINIT_POSIX_CLEANUP) @@ -589,6 +604,8 @@ static void Init(rtems_task_argument arg) #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1 +#define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 1 + #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1 #define CONFIGURE_MAXIMUM_POSIX_TIMERS 1 |