]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
nptl: tst-mutex8.c: Handle ENOTSUP PI mutex failure
authorMaciej W. Rozycki <macro@codesourcery.com>
Fri, 4 Oct 2013 23:00:32 +0000 (00:00 +0100)
committerMaciej W. Rozycki <macro@codesourcery.com>
Fri, 4 Oct 2013 23:00:32 +0000 (00:00 +0100)
nptl/ChangeLog
nptl/tst-mutex8.c

index 29469fcd911f9fab0ee2f3b608ff5679be2298c7..a08915382ef7640353bda1276ee8ccf25ea4d9a3 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-04  Maciej W. Rozycki  <macro@codesourcery.com>
+
+       * tst-mutex8.c (check_type) [ENABLE_PI]: Handle ENOTSUP failure
+       from pthread_mutex_init.
+
 2013-10-01  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
        [BZ #15988]
index d2307e47e7439874d570b38e109d1c9fc2823ac4..c3d40faabee217992eeb139f5870eaa5e2fbc382 100644 (file)
@@ -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;
     }