In x86 arch_os_get_current_thread(), do not load from %fs
authorDavid Lichteblau <david@lichteblau.com>
Wed, 12 Dec 2012 13:12:50 +0000 (14:12 +0100)
committerDavid Lichteblau <david@lichteblau.com>
Mon, 17 Dec 2012 13:42:07 +0000 (14:42 +0100)
commit9644b3bcfc539ab201da9d3251a3cc3ebc24d457
treec9edded07cd6bdbd9b6ec5aadbb118959b1fcdec
parentf21d139cd90695962174882c27585c02511c3027
In x86 arch_os_get_current_thread(), do not load from %fs

Simplify arch_os_get_current_thread() such that %fs is not being
loaded directly even on platforms which preserve it reliably (in
particular, Linux/x86 and Solaris/x86).

Aside from a code simplification and reduction of cross-platform
differences, this change is an improvement in the following way:

If arch_os_get_current_thread() gets called in a non-Lisp pthread,
it now returns NULL cleanly even on the platforms mentioned above.

On the other platforms, keep the support for restoring %fs, but
refactor to remove code duplication with arch_os_thread_init().
Coalesce the two differently-spelled Lisp features for this case
into one.
base-target-features.lisp-expr
make-config.sh
src/runtime/arch.h
src/runtime/thread.h
src/runtime/x86-bsd-os.c
src/runtime/x86-darwin-os.c