pthread: Use pthread_mutexattr_setrobust in tests

pthread_mutexattr_setrobust_np is about to be deprecated.
This commit is contained in:
Florian Weimer 2021-04-23 09:48:10 +02:00
parent 8a229ee93c
commit 0bdd797945
5 changed files with 6 additions and 6 deletions

View File

@ -91,7 +91,7 @@ do_test (void)
puts ("mutexattr_init failed");
return 1;
}
if (pthread_mutexattr_setrobust_np (&a, PTHREAD_MUTEX_ROBUST_NP) != 0)
if (pthread_mutexattr_setrobust (&a, PTHREAD_MUTEX_ROBUST_NP) != 0)
{
puts ("mutexattr_setrobust failed");
return 1;

View File

@ -56,7 +56,7 @@ do_test (void)
puts ("mutexattr_init failed");
return 0;
}
if (pthread_mutexattr_setrobust_np (&ma, PTHREAD_MUTEX_ROBUST_NP) != 0)
if (pthread_mutexattr_setrobust (&ma, PTHREAD_MUTEX_ROBUST_NP) != 0)
{
puts ("mutexattr_setrobust failed");
return 1;

View File

@ -89,7 +89,7 @@ do_test (void)
return 1;
}
if (pthread_mutexattr_setrobust_np (&a, PTHREAD_MUTEX_ROBUST_NP) != 0)
if (pthread_mutexattr_setrobust (&a, PTHREAD_MUTEX_ROBUST_NP) != 0)
{
puts ("mutexattr_setrobust failed");
return 1;

View File

@ -163,7 +163,7 @@ do_test (void)
puts ("mutexattr_init failed");
return 0;
}
if (pthread_mutexattr_setrobust_np (&ma, PTHREAD_MUTEX_ROBUST_NP) != 0)
if (pthread_mutexattr_setrobust (&ma, PTHREAD_MUTEX_ROBUST_NP) != 0)
{
puts ("mutexattr_setrobust failed");
return 1;

View File

@ -40,10 +40,10 @@ do_test (void)
pthread_mutexattr_t ma;
pthread_mutexattr_init (&ma);
err = pthread_mutexattr_setrobust_np (&ma, PTHREAD_MUTEX_ROBUST_NP);
err = pthread_mutexattr_setrobust (&ma, PTHREAD_MUTEX_ROBUST_NP);
if (err)
{
puts ("pthread_mutexattr_setrobust_np");
puts ("pthread_mutexattr_setrobust");
return 1;
}
#ifdef ENABLE_PI