Will eventually help to get rid of volatile for several synchronization
variables by enforcing a re-read in busy-wait loops:
while (state_var == STATE)
cpu_relax();
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
static inline void cpu_relax(void)
{
- asm volatile("rep; nop");
+ asm volatile("rep; nop" : : : "memory");
}
static inline void memory_barrier(void)
static inline void cpu_relax(void)
{
- asm volatile("rep; nop");
+ asm volatile("rep; nop" : : : "memory");
}
static inline void outb(u8 v, u16 port)