mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-08 02:10:18 +00:00
20 lines
398 B
Plaintext
20 lines
398 B
Plaintext
|
/*
|
||
|
* @(#)68020.gcc 10.1 (Sleepycat) 4/12/97
|
||
|
*
|
||
|
* For gcc/68K, 0 is clear, 1 is set.
|
||
|
*/
|
||
|
#define TSL_SET(tsl) ({ \
|
||
|
register tsl_t *__l = (tsl); \
|
||
|
int __r; \
|
||
|
asm volatile("tas %1; \n \
|
||
|
seq %0" \
|
||
|
: "=dm" (__r), "=m" (*__l) \
|
||
|
: "1" (*__l) \
|
||
|
); \
|
||
|
__r & 1; \
|
||
|
})
|
||
|
|
||
|
#define TSL_UNSET(tsl) (*(tsl) = 0)
|
||
|
#define TSL_INIT(tsl) TSL_UNSET(tsl)
|
||
|
|