mirror of
https://git.musl-libc.org/git/musl
synced 2025-03-18 16:43:07 +03:00
fix regression disabling use of pause instruction for x86 a_spin
commits e24984efd5c6ac5ea8e6cb6cd914fa8435d458bc and 16b55298dc4b6a54d287d7494e04542667ef8861 inadvertently disabled the a_spin implementations for i386, x86_64, and x32 by defining a macro named a_pause instead of a_spin. this should not have caused any functional regression, but it inhibited cpu relaxation while spinning for locks. bug reported by George Kulakowski.
This commit is contained in:
parent
6d1a3dfeaf
commit
5c3412d225
@ -71,7 +71,7 @@ static inline void a_barrier()
|
||||
__asm__ __volatile__( "" : : : "memory" );
|
||||
}
|
||||
|
||||
#define a_pause a_pause
|
||||
#define a_spin a_spin
|
||||
static inline void a_spin()
|
||||
{
|
||||
__asm__ __volatile__( "pause" : : : "memory" );
|
||||
|
@ -87,7 +87,7 @@ static inline void a_barrier()
|
||||
__asm__ __volatile__( "" : : : "memory" );
|
||||
}
|
||||
|
||||
#define a_pause a_pause
|
||||
#define a_spin a_spin
|
||||
static inline void a_spin()
|
||||
{
|
||||
__asm__ __volatile__( "pause" : : : "memory" );
|
||||
|
@ -96,7 +96,7 @@ static inline void a_barrier()
|
||||
__asm__ __volatile__( "" : : : "memory" );
|
||||
}
|
||||
|
||||
#define a_pause a_pause
|
||||
#define a_spin a_spin
|
||||
static inline void a_spin()
|
||||
{
|
||||
__asm__ __volatile__( "pause" : : : "memory" );
|
||||
|
Loading…
x
Reference in New Issue
Block a user