Add an ATOMIC_CLEAR_LONG.
This commit is contained in:
parent
90a44bc764
commit
04f392fe12
@ -90,6 +90,17 @@
|
||||
bne,pn %icc, 9b ; \
|
||||
mov r3, r2
|
||||
|
||||
/*
|
||||
* Atomically clear a number of bits of an u_long in memory.
|
||||
*/
|
||||
#define ATOMIC_CLEAR_LONG(r1, r2, r3, bits) \
|
||||
ldx [r1], r2 ; \
|
||||
9: andn r2, bits, r3 ; \
|
||||
casxa [r1] ASI_N, r2, r3 ; \
|
||||
cmp r2, r3 ; \
|
||||
bne,pn %icc, 9b ; \
|
||||
mov r3, r2
|
||||
|
||||
#define PCPU(member) PCPU_REG + PC_ ## member
|
||||
#define PCPU_ADDR(member, reg) \
|
||||
add PCPU_REG, PC_ ## member, reg
|
||||
|
Loading…
Reference in New Issue
Block a user