blob: 922910f2e882a92623f1adf833bdb0fbe34b82ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
$NetBSD: patch-af,v 1.5 1999/07/11 20:00:43 bad Exp $
*** include/storage/s_lock.h Sat Apr 10 19:43:01 1999
--- include/storage/s_lock.h Wed Apr 7 03:06:53 1999
***************
*** 124,129 ****
--- 124,145 ----
+ #if defined(__arm32__)
+ #define TAS(lock) tas(lock)
+
+ static __inline__ int
+ tas(volatile slock_t *lock)
+ {
+ register slock_t _res = 1;
+
+ __asm__("swpb %0, %0, [%3]": "=r"(_res), "=m"(*lock):"0"(_res), "r" (lock));
+ return (int) _res;
+ }
+
+ #endif /* __arm32__ */
+
+
+
#if defined(sparc)
#define TAS(lock) tas(lock)
|