NetBSD/sys/arch/sparc/include
manu bba80928a8 setcontext() used to be incompatible with -lpthread since it affected
the TLS pointer, therefore wrecking the pthread environement.

Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.

We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
  (powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
  setcontext() libc stub instead of doing a plain system call.

While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
  (hopefully helpful to spot MD problems introduced with this change)

Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
  powerpc, sh3, sparc and sparc64 is left to portmasters
  sparc64

Approved by core@
2012-09-12 02:00:51 +00:00
..
am7930_machdep.h
ansi.h Retire varargs.h support. Move machine/stdarg.h logic into MI 2011-07-17 20:54:30 +00:00
aout_machdep.h mark reloc bitfield linted 2012-03-17 21:45:39 +00:00
apmvar.h
asm.h
autoconf.h #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 20:57:45 +00:00
bootinfo.h Pass the "boothowto" from the bootloader to the kernel. 2012-05-28 19:24:29 +00:00
bsd_openprom.h
bswap.h
bus_defs.h Per discussion at 2011-07-01 17:09:58 +00:00
bus_funcs.h Per discussion at 2011-07-01 17:09:58 +00:00
cdefs.h Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions 2012-01-20 14:08:04 +00:00
cgtworeg.h
cpu.h On unaligned access, provide the data address to the signal handler, instead 2012-05-01 09:40:15 +00:00
cpuconf.h
ctlreg.h
db_machdep.h
disklabel.h Add getlabelusesmbr(), as proposed in 2011-08-30 12:39:49 +00:00
eeprom.h
elf_machdep.h
endian_machdep.h
endian.h
fenv.h
float.h
frame.h
fsr.h
idprom.h
ieee.h Add defines for extu_frac[ln]m 2011-07-10 04:49:37 +00:00
ieeefp.h make fp_except unsigned 2012-03-20 23:57:57 +00:00
instr.h
int_const.h
int_fmtio.h
int_limits.h
int_mwgwtypes.h
int_types.h
intr.h Remove safepri and use IPL_SAFEPRI instead. This may be defined in a MD 2012-07-27 05:36:09 +00:00
kbd.h
kbio.h
kcore.h
limits.h - Normalize inclusion protection (remove) 2012-03-28 17:03:27 +00:00
loadfile_machdep.h
lock.h
Makefile Retire varargs.h support. Move machine/stdarg.h logic into MI 2011-07-17 20:54:30 +00:00
math.h
mcontext.h setcontext() used to be incompatible with -lpthread since it affected 2012-09-12 02:00:51 +00:00
mutex.h
oldmon.h
openfirm.h
openpromio.h
param.h proper sizing of kmem_arena on different ports 2012-02-10 17:35:47 +00:00
pcb.h
pci_machdep.h
pmap.h
pmc.h
proc.h
profile.h
promlib.h
psl.h apply some always_inline attribute to setpsr and spl*. while i am 2011-08-28 22:30:09 +00:00
pte.h
ptrace.h
reg.h
reloc.h
remote-sl.h
rwlock.h
setjmp.h
signal.h
sunos_machdep.h
svr4_machdep.h
tctrl.h
trap.h
types.h Get rid of #ifdef __sparc__ in uvm code - as noted by cgd back 1996, 2011-07-30 19:29:12 +00:00
userret.h
vmparam.h
vuid_event.h
wchar_limits.h
z8530var.h #include <sys/bus.h> instead of <machine/bus.h>. 2011-07-01 20:57:45 +00:00