NetBSD/sys/arch/sh3/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
..
adcreg.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
asm.h
bscreg.h
bswap.h
bus_defs.h Per discussion at 2011-07-01 17:09:58 +00:00
bus_funcs.h Move some macros back to sh3/include/bus_funcs.h from 2011-07-25 21:12:23 +00:00
byte_swap.h
cache_sh3.h
cache_sh4.h
cache.h
cdefs.h Change CMSG_SPACE and CMSG_LEN to provide Integer Constant Expressions 2012-01-20 14:08:04 +00:00
clock.h
coff_machdep.h
cpgreg.h
cpu.h
cputypes.h
dacreg.h
db_machdep.h
devreg.h
disklabel.h
dmacreg.h
elf_machdep.h
endian_machdep.h
endian.h
exception.h
float.h
frame.h Remove COMPAT_SA / KERN_SA. Welcome to 6.99.3! 2012-02-19 21:05:51 +00:00
ieee.h
ieeefp.h
int_const.h
int_fmtio.h
int_limits.h
int_mwgwtypes.h
int_types.h
intcreg.h
intr.h
limits.h - Normalize inclusion protection (remove) 2012-03-28 17:03:27 +00:00
lock.h
locore.h
Makefile Do not install bus.h. 2011-07-17 23:52:12 +00:00
math.h
mcontext.h setcontext() used to be incompatible with -lpthread since it affected 2012-09-12 02:00:51 +00:00
mmu_sh3.h
mmu_sh4.h
mmu.h
mutex.h
param.h proper sizing of kmem_arena on different ports 2012-02-10 17:35:47 +00:00
pcb.h
pcicreg.h fix my license notice. 2012-01-21 19:44:28 +00:00
pfcreg.h
pmap.h
pmc.h
proc.h The MDP_USEDFPU (amd64 and sh3) and MDP_SSTEP (sh3) are lwp flags not 2012-07-08 20:14:11 +00:00
profile.h
psl.h
pte.h
ptrace.h #if-0'ed defines for PT_GETFPREGS and PT_SETFPREGS. Not used yet, but 2011-10-31 19:08:45 +00:00
reg.h
rtcreg.h
rwlock.h
scifreg.h
scireg.h
setjmp.h
sh_opcode.h
signal.h
tmureg.h
types.h Switch to new-style <sys/bus.h>. 2011-07-17 23:48:35 +00:00
ubcreg.h
userret.h The MDP_USEDFPU (amd64 and sh3) and MDP_SSTEP (sh3) are lwp flags not 2012-07-08 20:14:11 +00:00
vmparam.h
wchar_limits.h
wdogvar.h
wdtreg.h