From 53247a0b8fa937dc245eabacfaa6cd92cfffe475 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Sat, 5 Oct 2013 00:00:32 +0100 Subject: nptl: tst-mutex8.c: Handle ENOTSUP PI mutex failure --- nptl/ChangeLog | 5 +++++ nptl/tst-mutex8.c | 12 ++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) (limited to 'nptl') diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 29469fcd91..a08915382e 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2013-10-04 Maciej W. Rozycki + + * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure + from pthread_mutex_init. + 2013-10-01 Siddhesh Poyarekar [BZ #15988] diff --git a/nptl/tst-mutex8.c b/nptl/tst-mutex8.c index d2307e47e7..c3d40faabe 100644 --- a/nptl/tst-mutex8.c +++ b/nptl/tst-mutex8.c @@ -93,10 +93,18 @@ tf (void *arg) static int check_type (const char *mas, pthread_mutexattr_t *ma) { - int e __attribute__((unused)); + int e; - if (pthread_mutex_init (m, ma) != 0) + e = pthread_mutex_init (m, ma); + if (e != 0) { +#ifdef ENABLE_PI + if (e == ENOTSUP) + { + puts ("PI mutexes unsupported"); + return 0; + } +#endif printf ("1st mutex_init failed for %s\n", mas); return 1; } -- cgit v1.2.3