debuggers.hg

view xen/arch/x86/rwlock.c @ 3674:fb875591fd72

bitkeeper revision 1.1159.223.63 (42028527-fv-d9BM0_LRp8UKGP19gQ)

Fix NMI deferral.
Signed-off-by: keir.fraser@cl.cam.ac.uk
author kaf24@scramble.cl.cam.ac.uk
date Thu Feb 03 20:10:15 2005 +0000 (2005-02-03)
parents 0e23f01219c6
children
line source
1 #include <asm/atomic.h>
2 #include <asm/rwlock.h>
4 #if defined(CONFIG_SMP)
5 asm(
6 ".align 4\n"
7 ".globl __write_lock_failed\n"
8 "__write_lock_failed:\n"
9 " " LOCK "addl $" RW_LOCK_BIAS_STR ",(%"__OP"ax)\n"
10 "1: rep; nop\n"
11 " cmpl $" RW_LOCK_BIAS_STR ",(%"__OP"ax)\n"
12 " jne 1b\n"
13 " " LOCK "subl $" RW_LOCK_BIAS_STR ",(%"__OP"ax)\n"
14 " jnz __write_lock_failed\n"
15 " ret\n"
17 ".align 4\n"
18 ".globl __read_lock_failed\n"
19 "__read_lock_failed:\n"
20 " lock ; incl (%"__OP"ax)\n"
21 "1: rep; nop\n"
22 " cmpl $1,(%"__OP"ax)\n"
23 " js 1b\n"
24 " lock ; decl (%"__OP"ax)\n"
25 " js __read_lock_failed\n"
26 " ret\n"
27 );
28 #endif