Parent Directory | Revision Log | Patch
revision 1.5 by bellard, Thu Jun 5 00:54:44 2003 UTC | revision 1.6 by bellard, Mon Jun 9 15:26:35 2003 UTC | |
---|---|---|
# | Line 246 static inline int testandset (int *p) | Line 246 static inline int testandset (int *p) |
246 | } | } |
247 | #endif | #endif |
248 | ||
249 | #ifdef __arm__ | |
250 | static inline int testandset (int *spinlock) | |
251 | { | |
252 | register unsigned int ret; | |
253 | __asm__ __volatile__("swp %0, %1, [%2]" | |
254 | : "=r"(ret) | |
255 | : "0"(1), "r"(spinlock)); | |
256 | ||
257 | return ret; | |
258 | } | |
259 | #endif | |
260 | ||
261 | typedef int spinlock_t; | typedef int spinlock_t; |
262 | ||
263 | #define SPIN_LOCK_UNLOCKED 0 | #define SPIN_LOCK_UNLOCKED 0 |
|
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |