aboutsummaryrefslogtreecommitdiff
path: root/nptl/tst-mutex8.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2013-05-09 16:12:26 +0200
committerAndreas Jaeger <aj@suse.de>2013-05-09 16:15:50 +0200
commit66c13581afc5d348089bb9dcb68142ee3d26006e (patch)
tree74a760b2552c6f5971761d59162a9314863acb7e /nptl/tst-mutex8.c
parent24f5606614cb8b7c4dad930ee7871071dc26299f (diff)
downloadglibc-66c13581afc5d348089bb9dcb68142ee3d26006e.zip
glibc-66c13581afc5d348089bb9dcb68142ee3d26006e.tar.gz
glibc-66c13581afc5d348089bb9dcb68142ee3d26006e.tar.bz2
Fix tst-mutexpi8
2013-05-09 Andi Kleen <ak@linux.intel.com> * tst-mutex8.c (do_test): Check for ENABLE_PI.
Diffstat (limited to 'nptl/tst-mutex8.c')
-rw-r--r--nptl/tst-mutex8.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/nptl/tst-mutex8.c b/nptl/tst-mutex8.c
index 72dc9d4..2089c50 100644
--- a/nptl/tst-mutex8.c
+++ b/nptl/tst-mutex8.c
@@ -333,6 +333,13 @@ do_test (void)
puts ("1st mutexattr_settype failed");
return 1;
}
+#ifdef ENABLE_PI
+ if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT))
+ {
+ puts ("1st pthread_mutexattr_setprotocol failed");
+ return 1;
+ }
+#endif
puts ("check recursive mutex");
res |= check_type ("recursive", &ma);
if (pthread_mutexattr_destroy (&ma) != 0)
@@ -351,6 +358,13 @@ do_test (void)
puts ("2nd mutexattr_settype failed");
return 1;
}
+#ifdef ENABLE_PI
+ if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT))
+ {
+ puts ("2nd pthread_mutexattr_setprotocol failed");
+ return 1;
+ }
+#endif
puts ("check error-checking mutex");
res |= check_type ("error-checking", &ma);
if (pthread_mutexattr_destroy (&ma) != 0)