diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-09-21 15:42:45 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-10-05 14:29:02 +0200 |
commit | 89fc9345dea5c675f8d93546fa3c723918d3279a (patch) | |
tree | 89c32d64f375e1a9bf9d3725b1256aeb7ca46221 /testsuites/sptests | |
parent | posix: Implement self-contained POSIX barriers (diff) | |
download | rtems-89fc9345dea5c675f8d93546fa3c723918d3279a.tar.bz2 |
posix: Implement self-contained POSIX rwlocks
POSIX rwlocks are now available in all configurations and no longer
depend on --enable-posix.
Update #2514.
Update #3115.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r-- | testsuites/sptests/spsysinit01/init.c | 16 | ||||
-rw-r--r-- | testsuites/sptests/spthreadq01/init.c | 19 |
2 files changed, 0 insertions, 35 deletions
diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c index ff450b9ace..ab9e4a8e64 100644 --- a/testsuites/sptests/spsysinit01/init.c +++ b/testsuites/sptests/spsysinit01/init.c @@ -114,8 +114,6 @@ typedef enum { POSIX_SEMAPHORE_POST, POSIX_TIMER_PRE, POSIX_TIMER_POST, - POSIX_RWLOCK_PRE, - POSIX_RWLOCK_POST, POSIX_SHM_PRE, POSIX_SHM_POST, #endif /* RTEMS_POSIX_API */ @@ -503,18 +501,6 @@ LAST(RTEMS_SYSINIT_POSIX_TIMER) next_step(POSIX_TIMER_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); -} - FIRST(RTEMS_SYSINIT_POSIX_SHM) { assert(_POSIX_Shm_Information.maximum == 0); @@ -749,8 +735,6 @@ static void *POSIX_Init(void *arg) #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1 -#define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 1 - #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1 #define CONFIGURE_MAXIMUM_POSIX_SHMS 1 diff --git a/testsuites/sptests/spthreadq01/init.c b/testsuites/sptests/spthreadq01/init.c index 2b994e5d68..5416118144 100644 --- a/testsuites/sptests/spthreadq01/init.c +++ b/testsuites/sptests/spthreadq01/init.c @@ -42,7 +42,6 @@ typedef struct { #if defined(RTEMS_POSIX_API) pthread_mutex_t pmtx; pthread_cond_t pcv; - pthread_rwlock_t prw; mqd_t pmq; #endif } test_context; @@ -139,15 +138,6 @@ static void posix_worker(test_context *ctx) eno = pthread_mutex_unlock(&ctx->pmtx); rtems_test_assert(eno == 0); - eno = pthread_rwlock_wrlock(&ctx->prw); - rtems_test_assert(eno == 0); - - wake_up_master(ctx); - rtems_test_assert(get_wait_id(ctx) == ctx->prw); - - eno = pthread_rwlock_unlock(&ctx->prw); - rtems_test_assert(eno == 0); - wake_up_master(ctx); rtems_test_assert(get_wait_id(ctx) == ctx->pmq); @@ -219,9 +209,6 @@ static void test_posix_init(test_context *ctx) eno = pthread_cond_init(&ctx->pcv, NULL); rtems_test_assert(eno == 0); - eno = pthread_rwlock_init(&ctx->prw, NULL); - rtems_test_assert(eno == 0); - memset(&attr, 0, sizeof(attr)); attr.mq_maxmsg = 1; attr.mq_msgsize = sizeof(char); @@ -313,11 +300,6 @@ static void test_posix_obj(test_context *ctx) wait_for_worker(ctx); - eno = pthread_rwlock_wrlock(&ctx->prw); - rtems_test_assert(eno == 0); - - wait_for_worker(ctx); - buf[0] = 'y'; prio = 1; n = mq_receive(ctx->pmq, &buf[0], sizeof(buf), &prio); @@ -362,7 +344,6 @@ static rtems_task Init( #if defined(RTEMS_POSIX_API) #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1 #define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1 - #define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 1 #define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 1 #define CONFIGURE_MESSAGE_BUFFER_MEMORY \ (2 * CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(1, 1)) |