Fix tst-mutexpi8

2013-05-09  Andi Kleen  <ak@linux.intel.com>

	* tst-mutex8.c (do_test): Check for ENABLE_PI.
This commit is contained in:
Andi Kleen 2013-05-09 16:12:26 +02:00 committed by Andreas Jaeger
parent 24f5606614
commit 66c13581af
2 changed files with 18 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2013-05-09 Andi Kleen <ak@linux.intel.com>
* tst-mutex8.c (do_test): Check for ENABLE_PI.
2013-04-22 Siddhesh Poyarekar <siddhesh@redhat.com>
* pthreadP.h (check_sched_policy_attr): New inline function.

View File

@ -333,6 +333,13 @@ do_test (void)
puts ("1st mutexattr_settype failed");
return 1;
}
#ifdef ENABLE_PI
if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT))
{
puts ("1st pthread_mutexattr_setprotocol failed");
return 1;
}
#endif
puts ("check recursive mutex");
res |= check_type ("recursive", &ma);
if (pthread_mutexattr_destroy (&ma) != 0)
@ -351,6 +358,13 @@ do_test (void)
puts ("2nd mutexattr_settype failed");
return 1;
}
#ifdef ENABLE_PI
if (pthread_mutexattr_setprotocol (&ma, PTHREAD_PRIO_INHERIT))
{
puts ("2nd pthread_mutexattr_setprotocol failed");
return 1;
}
#endif
puts ("check error-checking mutex");
res |= check_type ("error-checking", &ma);
if (pthread_mutexattr_destroy (&ma) != 0)