diff options
Diffstat (limited to 'sysdeps/pthread/tst-mutex9.c')
-rw-r--r-- | sysdeps/pthread/tst-mutex9.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sysdeps/pthread/tst-mutex9.c b/sysdeps/pthread/tst-mutex9.c index bfc01f8c75..081aeff0f6 100644 --- a/sysdeps/pthread/tst-mutex9.c +++ b/sysdeps/pthread/tst-mutex9.c @@ -30,6 +30,10 @@ #include <support/timespec.h> #include <support/xunistd.h> +#ifdef ENABLE_PP +#include "tst-tpp.h" +#endif + /* A bogus clock value that tells run_test to use pthread_mutex_timedlock rather than pthread_mutex_clocklock. */ @@ -73,8 +77,11 @@ do_test_clock (clockid_t clockid) TEST_COMPARE (pthread_mutexattr_settype (&a, PTHREAD_MUTEX_RECURSIVE), 0); -#ifdef ENABLE_PI +#if defined ENABLE_PI TEST_COMPARE (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_INHERIT), 0); +#elif defined ENABLE_PP + TEST_COMPARE (pthread_mutexattr_setprotocol (&a, PTHREAD_PRIO_PROTECT), 0); + TEST_COMPARE (pthread_mutexattr_setprioceiling (&a, 6), 0); #endif int e; @@ -131,6 +138,10 @@ do_test_clock (clockid_t clockid) static int do_test (void) { +#ifdef ENABLE_PP + init_tpp_test (); +#endif + do_test_clock (CLOCK_USE_TIMEDLOCK); do_test_clock (CLOCK_REALTIME); #ifndef ENABLE_PI |