summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests/spthreadq01
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-12 08:09:16 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-05 14:29:01 +0200
commitc090db7405b72ce6d0b726c0a39fb1c1aebab7ea (patch)
tree099a887f445115e9b40d25cd6a2b2b11908d347d /testsuites/sptests/spthreadq01
parentposix: Optimize pthread_once_t (diff)
downloadrtems-c090db7405b72ce6d0b726c0a39fb1c1aebab7ea.tar.bz2
posix: Implement self-contained POSIX semaphores
For semaphore object pointer and object validation see POSIX_SEMAPHORE_VALIDATE_OBJECT(). Destruction or close of a busy semaphore returns an error status. The object is not flushed. POSIX semaphores are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3116.
Diffstat (limited to 'testsuites/sptests/spthreadq01')
-rw-r--r--testsuites/sptests/spthreadq01/init.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/testsuites/sptests/spthreadq01/init.c b/testsuites/sptests/spthreadq01/init.c
index 8f02e4d650..2b994e5d68 100644
--- a/testsuites/sptests/spthreadq01/init.c
+++ b/testsuites/sptests/spthreadq01/init.c
@@ -40,7 +40,6 @@ typedef struct {
rtems_id mq;
rtems_id br;
#if defined(RTEMS_POSIX_API)
- sem_t psem;
pthread_mutex_t pmtx;
pthread_cond_t pcv;
pthread_rwlock_t prw;
@@ -120,12 +119,6 @@ static void posix_worker(test_context *ctx)
int eno;
char buf[1];
- wake_up_master(ctx);
- rtems_test_assert(get_wait_id(ctx) == ctx->psem);
-
- rv = sem_post(&ctx->psem);
- rtems_test_assert(rv == 0);
-
eno = pthread_mutex_lock(&ctx->pmtx);
rtems_test_assert(eno == 0);
@@ -217,13 +210,9 @@ static void test_classic_init(test_context *ctx)
static void test_posix_init(test_context *ctx)
{
#if defined(RTEMS_POSIX_API)
- int rv;
int eno;
struct mq_attr attr;
- rv = sem_init(&ctx->psem, 0, 0);
- rtems_test_assert(rv == 0);
-
eno = pthread_mutex_init(&ctx->pmtx, NULL);
rtems_test_assert(eno == 0);
@@ -306,7 +295,6 @@ static void test_classic_obj(test_context *ctx)
static void test_posix_obj(test_context *ctx)
{
#if defined(RTEMS_POSIX_API)
- int rv;
int eno;
char buf[1];
unsigned prio;
@@ -314,11 +302,6 @@ static void test_posix_obj(test_context *ctx)
wait_for_worker(ctx);
- rv = sem_wait(&ctx->psem);
- rtems_test_assert(rv == 0);
-
- wait_for_worker(ctx);
-
eno = pthread_mutex_lock(&ctx->pmtx);
rtems_test_assert(eno == 0);
@@ -377,7 +360,6 @@ static rtems_task Init(
#define CONFIGURE_MAXIMUM_BARRIERS 1
#if defined(RTEMS_POSIX_API)
- #define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1
#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
#define CONFIGURE_MAXIMUM_POSIX_CONDITION_VARIABLES 1
#define CONFIGURE_MAXIMUM_POSIX_RWLOCKS 1