[rtems commit] sptests/spsyslock01: Disable POSIX dependent parts

Sebastian Huber sebh at rtems.org
Tue Jan 26 16:42:43 UTC 2016


Module:    rtems
Branch:    master
Commit:    1f0e004e059ff9a4dbafb4bc0901d7825ba8b2ce
Changeset: http://git.rtems.org/rtems/commit/?id=1f0e004e059ff9a4dbafb4bc0901d7825ba8b2ce

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Tue Jan 26 17:41:36 2016 +0100

sptests/spsyslock01: Disable POSIX dependent parts

---

 testsuites/sptests/spsyslock01/init.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/testsuites/sptests/spsyslock01/init.c b/testsuites/sptests/spsyslock01/init.c
index 3610bf2..5bf5d6a 100644
--- a/testsuites/sptests/spsyslock01/init.c
+++ b/testsuites/sptests/spsyslock01/init.c
@@ -493,6 +493,7 @@ static void mid_task(rtems_task_argument arg)
   rtems_test_assert(0);
 }
 
+#ifdef RTEMS_POSIX_API
 static void deadlock_cleanup(void *arg)
 {
   struct _Mutex_Control *deadlock_mtx = arg;
@@ -505,6 +506,7 @@ static void deadlock_cleanup(void *arg)
   _Mutex_Release(deadlock_mtx);
   _Mutex_Destroy(deadlock_mtx);
 }
+#endif
 
 static void high_task(rtems_task_argument idx)
 {
@@ -554,13 +556,17 @@ static void high_task(rtems_task_argument idx)
     if ((events & EVENT_MTX_DEADLOCK) != 0) {
       struct _Mutex_Control *deadlock_mtx = &ctx->deadlock_mtx;
 
+#ifdef RTEMS_POSIX_API
       pthread_cleanup_push(deadlock_cleanup, deadlock_mtx);
+#endif
 
       _Mutex_Initialize(deadlock_mtx);
       _Mutex_Acquire(deadlock_mtx);
       _Mutex_Acquire(deadlock_mtx);
 
+#ifdef RTEMS_POSIX_API
       pthread_cleanup_pop(0);
+#endif
     }
 
     if ((events & EVENT_REC_MTX_ACQUIRE) != 0) {
@@ -676,8 +682,10 @@ static void test(void)
   sc = rtems_task_delete(ctx->mid);
   rtems_test_assert(sc == RTEMS_SUCCESSFUL);
 
+#ifdef RTEMS_POSIX_API
   sc = rtems_task_delete(ctx->high[0]);
   rtems_test_assert(sc == RTEMS_SUCCESSFUL);
+#endif
 
   sc = rtems_task_delete(ctx->high[1]);
   rtems_test_assert(sc == RTEMS_SUCCESSFUL);



More information about the vc mailing list