a2a0f90654
Many extern struct pcpu <something>__pcpu declarations were copied/pasted in sources. The issue is that the definition is MD, but it cannot be provided by machine/pcpu.h due to actual struct pcpu defined in sys/pcpu.h later than the inclusion of machine/pcpu.h. This forced the copying when other code needed direct access to __pcpu. There is no way around it, due to machine/pcpu.h supplying part of struct pcpu fields. To work around the problem, add a new machine/pcpu_aux.h header, which should fill any needed MD definitions after struct pcpu definition is completed. This allows to remove copies of __pcpu spread around the source. Also on x86 it makes it possible to remove work arounds like OFFSETOF_CURTHREAD or clang specific warnings supressions. Reported and tested by: lwhsu, bcran Reviewed by: imp, markj (previous version) Discussed with: jhb Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D21418 |
||
---|---|---|
.. | ||
_align.h | ||
_bus.h | ||
_inttypes.h | ||
_limits.h | ||
_stdint.h | ||
_types.h | ||
asm.h | ||
atomic.h | ||
bus_dma_impl.h | ||
bus_dma.h | ||
bus.h | ||
clock.h | ||
counter.h | ||
cpu.h | ||
cpufunc.h | ||
db_machdep.h | ||
dump.h | ||
efi.h | ||
elf.h | ||
encoding.h | ||
endian.h | ||
exec.h | ||
float.h | ||
floatingpoint.h | ||
fpe.h | ||
frame.h | ||
ieeefp.h | ||
in_cksum.h | ||
intr.h | ||
kdb.h | ||
machdep.h | ||
md_var.h | ||
memdev.h | ||
minidump.h | ||
ofw_machdep.h | ||
param.h | ||
pcb.h | ||
pcpu_aux.h | ||
pcpu.h | ||
pmap.h | ||
pmc_mdep.h | ||
proc.h | ||
procctl.h | ||
profile.h | ||
psl.h | ||
pte.h | ||
ptrace.h | ||
reg.h | ||
reloc.h | ||
resource.h | ||
riscvreg.h | ||
runq.h | ||
sbi.h | ||
setjmp.h | ||
sf_buf.h | ||
sigframe.h | ||
signal.h | ||
smp.h | ||
stack.h | ||
stdarg.h | ||
sysarch.h | ||
trap.h | ||
ucontext.h | ||
vdso.h | ||
vm.h | ||
vmparam.h |