c68c78be86
These did not cooperate with the hash-locked scheme of the other atomic operations, with the effect that, for instance, a typical naive spin lock based on atomic_*, volatile unsigned locked = 0; lock() { while (atomic_swap_uint(&locked, 1)) continue; membar_acquire(); } unlock() { membar_release(); atomic_store_relaxed(&locked, 0); } would fail to achieve mutual exclusion. For this case, we need to use atomic_swap_* (or, for 8- or 16-bit objects, atomic_cas_32 loops, since there is no atomic_swap_8 or atomic_swap_16). The new machine/types.h macro __HAVE_HASHLOCKED_ATOMICS says whether these contortions are necessary. Note that this _requires_ the use of atomic_store_*(p, v), not regular stores *p = v, to work with the r/m/w atomic operations. |
||
---|---|---|
.. | ||
Makefile | ||
ansi.h | ||
aout_machdep.h | ||
apmvar.h | ||
asm.h | ||
autoconf.h | ||
bootinfo.h | ||
bsd_openprom.h | ||
bswap.h | ||
bus_defs.h | ||
bus_funcs.h | ||
cdefs.h | ||
cgtworeg.h | ||
cpu.h | ||
cpuconf.h | ||
ctlreg.h | ||
db_machdep.h | ||
disklabel.h | ||
eeprom.h | ||
elf_machdep.h | ||
elf_support.h | ||
endian.h | ||
endian_machdep.h | ||
fenv.h | ||
float.h | ||
frame.h | ||
fsr.h | ||
idprom.h | ||
ieee.h | ||
ieeefp.h | ||
instr.h | ||
int_const.h | ||
int_fmtio.h | ||
int_limits.h | ||
int_mwgwtypes.h | ||
int_types.h | ||
intr.h | ||
kbd.h | ||
kbio.h | ||
kcore.h | ||
limits.h | ||
loadfile_machdep.h | ||
lock.h | ||
locore.h | ||
math.h | ||
mcontext.h | ||
mutex.h | ||
oldmon.h | ||
openfirm.h | ||
openpromio.h | ||
param.h | ||
pcb.h | ||
pci_machdep.h | ||
pmap.h | ||
proc.h | ||
profile.h | ||
promlib.h | ||
psl.h | ||
pte.h | ||
ptrace.h | ||
reg.h | ||
reloc.h | ||
remote-sl.h | ||
rwlock.h | ||
setjmp.h | ||
signal.h | ||
sljit_machdep.h | ||
sunos_machdep.h | ||
tctrl.h | ||
trap.h | ||
types.h | ||
userret.h | ||
vmparam.h | ||
vuid_event.h | ||
wchar_limits.h | ||
z8530var.h |