summaryrefslogtreecommitdiffstats
path: root/testsuites/sptests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-09-27 15:08:33 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-05 14:29:02 +0200
commitde59c065c57cb8526662ee6da28a57ad16fdde66 (patch)
tree21f4a2adbd58f65f722051bca435572fbf5dcf05 /testsuites/sptests
parentposix: Implement self-contained POSIX condvar (diff)
downloadrtems-de59c065c57cb8526662ee6da28a57ad16fdde66.tar.bz2
posix: Implement self-contained POSIX mutex
POSIX mutexes are now available in all configurations and no longer depend on --enable-posix. Update #2514. Update #3112.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r--testsuites/sptests/spmutex01/init.c1
-rw-r--r--testsuites/sptests/spsysinit01/init.c15
-rw-r--r--testsuites/sptests/spthreadq01/init.c38
3 files changed, 0 insertions, 54 deletions
diff --git a/testsuites/sptests/spmutex01/init.c b/testsuites/sptests/spmutex01/init.c
index 0c216a3901..b9d4a05f73 100644
--- a/testsuites/sptests/spmutex01/init.c
+++ b/testsuites/sptests/spmutex01/init.c
@@ -713,7 +713,6 @@ static void fatal_extension(
#define CONFIGURE_MAXIMUM_SEMAPHORES 3
#ifdef RTEMS_POSIX_API
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
#endif
#define CONFIGURE_INITIAL_EXTENSIONS \
diff --git a/testsuites/sptests/spsysinit01/init.c b/testsuites/sptests/spsysinit01/init.c
index 902d6abe03..f6fa1ddaf4 100644
--- a/testsuites/sptests/spsysinit01/init.c
+++ b/testsuites/sptests/spsysinit01/init.c
@@ -103,8 +103,6 @@ typedef enum {
POSIX_SIGNALS_POST,
POSIX_THREADS_PRE,
POSIX_THREADS_POST,
- POSIX_MUTEX_PRE,
- POSIX_MUTEX_POST,
POSIX_MESSAGE_QUEUE_PRE,
POSIX_MESSAGE_QUEUE_POST,
POSIX_SEMAPHORE_PRE,
@@ -438,18 +436,6 @@ LAST(RTEMS_SYSINIT_POSIX_THREADS)
next_step(POSIX_THREADS_POST);
}
-FIRST(RTEMS_SYSINIT_POSIX_MUTEX)
-{
- assert(_POSIX_Mutex_Information.maximum == 0);
- next_step(POSIX_MUTEX_PRE);
-}
-
-LAST(RTEMS_SYSINIT_POSIX_MUTEX)
-{
- assert(_POSIX_Mutex_Information.maximum != 0);
- next_step(POSIX_MUTEX_POST);
-}
-
FIRST(RTEMS_SYSINIT_POSIX_MESSAGE_QUEUE)
{
assert(_POSIX_Message_queue_Information.maximum == 0);
@@ -716,7 +702,6 @@ static void *POSIX_Init(void *arg)
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 1
-#define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
#define CONFIGURE_MAXIMUM_POSIX_SEMAPHORES 1
diff --git a/testsuites/sptests/spthreadq01/init.c b/testsuites/sptests/spthreadq01/init.c
index 473db6d05a..5ec03fdddc 100644
--- a/testsuites/sptests/spthreadq01/init.c
+++ b/testsuites/sptests/spthreadq01/init.c
@@ -40,8 +40,6 @@ typedef struct {
rtems_id mq;
rtems_id br;
#if defined(RTEMS_POSIX_API)
- pthread_mutex_t pmtx;
- pthread_cond_t pcv;
mqd_t pmq;
#endif
} test_context;
@@ -118,24 +116,6 @@ static void posix_worker(test_context *ctx)
int eno;
char buf[1];
- eno = pthread_mutex_lock(&ctx->pmtx);
- rtems_test_assert(eno == 0);
-
- wake_up_master(ctx);
- rtems_test_assert(get_wait_id(ctx) == ctx->pmtx);
-
- eno = pthread_mutex_unlock(&ctx->pmtx);
- rtems_test_assert(eno == 0);
-
- eno = pthread_mutex_lock(&ctx->pmtx);
- rtems_test_assert(eno == 0);
-
- eno = pthread_cond_signal(&ctx->pcv);
- rtems_test_assert(eno == 0);
-
- eno = pthread_mutex_unlock(&ctx->pmtx);
- rtems_test_assert(eno == 0);
-
wake_up_master(ctx);
rtems_test_assert(get_wait_id(ctx) == ctx->pmq);
@@ -201,12 +181,6 @@ static void test_posix_init(test_context *ctx)
int eno;
struct mq_attr attr;
- eno = pthread_mutex_init(&ctx->pmtx, NULL);
- rtems_test_assert(eno == 0);
-
- eno = pthread_cond_init(&ctx->pcv, NULL);
- rtems_test_assert(eno == 0);
-
memset(&attr, 0, sizeof(attr));
attr.mq_maxmsg = 1;
attr.mq_msgsize = sizeof(char);
@@ -287,17 +261,6 @@ static void test_posix_obj(test_context *ctx)
wait_for_worker(ctx);
- eno = pthread_mutex_lock(&ctx->pmtx);
- rtems_test_assert(eno == 0);
-
- eno = pthread_cond_wait(&ctx->pcv, &ctx->pmtx);
- rtems_test_assert(eno == 0);
-
- eno = pthread_mutex_unlock(&ctx->pmtx);
- rtems_test_assert(eno == 0);
-
- wait_for_worker(ctx);
-
buf[0] = 'y';
prio = 1;
n = mq_receive(ctx->pmq, &buf[0], sizeof(buf), &prio);
@@ -340,7 +303,6 @@ static rtems_task Init(
#define CONFIGURE_MAXIMUM_BARRIERS 1
#if defined(RTEMS_POSIX_API)
- #define CONFIGURE_MAXIMUM_POSIX_MUTEXES 1
#define CONFIGURE_MAXIMUM_POSIX_MESSAGE_QUEUES 1
#define CONFIGURE_MESSAGE_BUFFER_MEMORY \
(2 * CONFIGURE_MESSAGE_BUFFERS_FOR_QUEUE(1, 1))