diff options
author | Maciej W. Rozycki <macro@codesourcery.com> | 2013-10-05 00:00:32 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@codesourcery.com> | 2013-10-05 00:00:32 +0100 |
commit | 53247a0b8fa937dc245eabacfaa6cd92cfffe475 (patch) | |
tree | b0d85826d406de81000ce697bbc8896e3eefa037 /nptl/tst-mutex8.c | |
parent | 428d8c5e69b0e9c0baef2e21361f9c936d32070b (diff) | |
download | glibc-53247a0b8fa937dc245eabacfaa6cd92cfffe475.tar.gz |
nptl: tst-mutex8.c: Handle ENOTSUP PI mutex failure
Diffstat (limited to 'nptl/tst-mutex8.c')
-rw-r--r-- | nptl/tst-mutex8.c | 12 |
1 files changed, 10 insertions, 2 deletions
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; } |