mirror of https://github.com/l4ka/pistachio.git
Use separate subsection rather than section for spinlocks assembly code.
This commit is contained in:
parent
550c2c1378
commit
d0abf759b1
|
@ -1,6 +1,6 @@
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
*
|
*
|
||||||
* Copyright (C) 2002-2003, 2006-2009, Karlsruhe University
|
* Copyright (C) 2002-2003, 2006-2009, 2011, Karlsruhe University
|
||||||
*
|
*
|
||||||
* File path: arch/x86/sync.h
|
* File path: arch/x86/sync.h
|
||||||
* Description: synchronization primitives for x86
|
* Description: synchronization primitives for x86
|
||||||
|
@ -72,7 +72,7 @@ INLINE void spinlock_t::lock()
|
||||||
"xchg %1, %2 \n\t"
|
"xchg %1, %2 \n\t"
|
||||||
"test $0xff, %2 \n\t"
|
"test $0xff, %2 \n\t"
|
||||||
"jnz 2f \n\t"
|
"jnz 2f \n\t"
|
||||||
".section .spinlock \n\t"
|
".subsection 2 \n\t"
|
||||||
"2: \n\t"
|
"2: \n\t"
|
||||||
"mov $"MKSTR(SYNC_THRESHOLD)", %2 \n\t"
|
"mov $"MKSTR(SYNC_THRESHOLD)", %2 \n\t"
|
||||||
"3: \n\t"
|
"3: \n\t"
|
||||||
|
@ -98,7 +98,7 @@ INLINE void spinlock_t::lock()
|
||||||
"xchg %1, %2 \n\t"
|
"xchg %1, %2 \n\t"
|
||||||
"test $0xff, %2 \n\t"
|
"test $0xff, %2 \n\t"
|
||||||
"jnz 2f \n\t"
|
"jnz 2f \n\t"
|
||||||
".section .spinlock \n\t"
|
".subsection 2 \n\t"
|
||||||
"2: \n\t"
|
"2: \n\t"
|
||||||
"rep; nop \n\t"
|
"rep; nop \n\t"
|
||||||
"testb $1, %1 \n\t"
|
"testb $1, %1 \n\t"
|
||||||
|
|
Loading…
Reference in New Issue