mirror of git://sourceware.org/git/glibc.git
nptl: tst-mutex8.c: Handle ENOTSUP PI mutex failure
This commit is contained in:
parent
428d8c5e69
commit
53247a0b8f
|
@ -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>
|
2013-10-01 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||||
|
|
||||||
[BZ #15988]
|
[BZ #15988]
|
||||||
|
|
|
@ -93,10 +93,18 @@ tf (void *arg)
|
||||||
static int
|
static int
|
||||||
check_type (const char *mas, pthread_mutexattr_t *ma)
|
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);
|
printf ("1st mutex_init failed for %s\n", mas);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue