mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
Add minimal test suite changes for elision enabled kernels
tst-mutex5 and 8 test some behaviour not required by POSIX, that elision changes. This changes these tests to not check this when elision is enabled at configure time.
This commit is contained in:
@ -22,6 +22,7 @@
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
#include <config.h>
|
||||
|
||||
|
||||
#ifndef TYPE
|
||||
@ -85,6 +86,8 @@ do_test (void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Elided locks do not time out. */
|
||||
#ifdef ENABLE_LOCK_ELISION
|
||||
if (pthread_mutex_trylock (&m) == 0)
|
||||
{
|
||||
puts ("mutex_trylock succeeded");
|
||||
@ -180,6 +183,7 @@ do_test (void)
|
||||
puts ("3rd timedlock didn't return right away");
|
||||
return 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pthread_mutex_unlock (&m) != 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user