From 4eb984d3ab5641ce7992204756ac15a61f5f7181 Mon Sep 17 00:00:00 2001 From: Torvald Riegel Date: Tue, 23 Jun 2015 15:22:25 +0200 Subject: Clean up BUSY_WAIT_NOP and atomic_delay. This patch combines BUSY_WAIT_NOP and atomic_delay into a new atomic_spin_nop function and adjusts all clients. The new function is put into atomic.h because what is best done in a spin loop is architecture-specific, and atomics must be used for spinning. The function name is meant to tell users that this has no effect on synchronization semantics but is a performance aid for spinning. --- sysdeps/i386/i486/bits/atomic.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sysdeps/i386/i486') diff --git a/sysdeps/i386/i486/bits/atomic.h b/sysdeps/i386/i486/bits/atomic.h index 59165be..59f3d34 100644 --- a/sysdeps/i386/i486/bits/atomic.h +++ b/sysdeps/i386/i486/bits/atomic.h @@ -479,7 +479,7 @@ typedef uintmax_t uatomic_max_t; __result; }) -#define atomic_delay() asm ("rep; nop") +#define atomic_spin_nop() asm ("rep; nop") #define __arch_and_body(lock, mem, mask) \ -- cgit v1.1