Revision e026db58 exec-i386.c
b/exec-i386.c | ||
---|---|---|
102 | 102 |
} |
103 | 103 |
#endif |
104 | 104 |
|
105 |
#ifdef __alpha__ |
|
106 |
int testandset (int *p) |
|
107 |
{ |
|
108 |
int ret; |
|
109 |
unsigned long one; |
|
110 |
|
|
111 |
__asm__ __volatile__ ("0: mov 1,%2\n" |
|
112 |
" ldl_l %0,%1\n" |
|
113 |
" stl_c %2,%1\n" |
|
114 |
" beq %2,1f\n" |
|
115 |
".subsection 2\n" |
|
116 |
"1: br 0b\n" |
|
117 |
".previous" |
|
118 |
: "=r" (ret), "=m" (*p), "=r" (one) |
|
119 |
: "m" (*p)); |
|
120 |
return ret; |
|
121 |
} |
|
122 |
#endif |
|
123 |
|
|
105 | 124 |
int global_cpu_lock = 0; |
106 | 125 |
|
107 | 126 |
void cpu_lock(void) |
Also available in: Unified diff