projects
/
sbcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix attach_thread to allocate a TLS index for *gc-inhibit* if needed
[sbcl.git]
/
src
/
runtime
/
x86-sunos-os.c
diff --git
a/src/runtime/x86-sunos-os.c
b/src/runtime/x86-sunos-os.c
index
45d87f4
..
0edd0b1
100644
(file)
--- a/
src/runtime/x86-sunos-os.c
+++ b/
src/runtime/x86-sunos-os.c
@@
-27,7
+27,6
@@
#ifdef LISP_FEATURE_SB_THREAD
pthread_mutex_t modify_ldt_lock = PTHREAD_MUTEX_INITIALIZER;
#ifdef LISP_FEATURE_SB_THREAD
pthread_mutex_t modify_ldt_lock = PTHREAD_MUTEX_INITIALIZER;
-#endif
static int
ldt_index_selector (int index) {
static int
ldt_index_selector (int index) {
@@
-90,6
+89,7
@@
install_segment (unsigned long start, unsigned long size) {
return selector;
}
return selector;
}
+#endif
int arch_os_thread_init(struct thread *thread) {
stack_t sigstack;
int arch_os_thread_init(struct thread *thread) {
stack_t sigstack;
@@
-102,6
+102,10
@@
int arch_os_thread_init(struct thread *thread) {
thread->tls_cookie = sel;
pthread_setspecific(specials,thread);
thread->tls_cookie = sel;
pthread_setspecific(specials,thread);
+
+# ifdef LISP_FEATURE_SB_SAFEPOINT
+ thread->selfptr = thread;
+# endif
#endif
#ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
#endif
#ifdef LISP_FEATURE_C_STACK_IS_CONTROL_STACK
@@
-121,8
+125,8
@@
int arch_os_thread_cleanup(struct thread *thread) {
int n = thread->tls_cookie;
struct ssd delete = { n, 0, 0, 0, 0};
int n = thread->tls_cookie;
struct ssd delete = { n, 0, 0, 0, 0};
- /* Set the %%fs register back to 0 and free the the ldt
- * by setting it to NULL.
+ /* Set the %%fs register back to 0 and free the ldt by setting it
+ * to NULL.
*/
FSHOW_SIGNAL((stderr, "/ TLS: Freeing LDT %x\n", n));
*/
FSHOW_SIGNAL((stderr, "/ TLS: Freeing LDT %x\n", n));