NetBSD/sys/arch/sparc/include
riastradh c68c78be86 sys/atomic.h: Fix atomic_store_* on sparcv7, sparcv8.
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.
2022-07-30 14:13:27 +00:00
..
Makefile
ansi.h
aout_machdep.h
apmvar.h
asm.h
autoconf.h fix various small typos, mainly in comments. 2022-05-22 11:27:33 +00:00
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 Document the calculation of CC64FSZ 2022-02-15 20:35:37 +00:00
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 sparc: __cpu_simple_lock membar audit. 2022-02-13 13:41:17 +00:00
locore.h remove clause 3 from all my licenses that aren't conflicting with 2021-12-11 19:24:18 +00:00
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 Change the devhandle_from_*() functions to also take a "super handle", 2022-01-22 11:49:16 +00:00
psl.h In order to prevent _mcount() from being recursively called when built with COPTS=-O0, 2021-11-02 11:26:03 +00:00
pte.h fix various typos in comments and log messages. 2022-05-29 10:47:39 +00:00
ptrace.h
reg.h
reloc.h
remote-sl.h
rwlock.h
setjmp.h
signal.h Making "struct sigcontext" visible only to _LIBC || _KERNEL is too 2021-10-28 23:41:06 +00:00
sljit_machdep.h
sunos_machdep.h
tctrl.h
trap.h
types.h sys/atomic.h: Fix atomic_store_* on sparcv7, sparcv8. 2022-07-30 14:13:27 +00:00
userret.h
vmparam.h
vuid_event.h
wchar_limits.h
z8530var.h