Index: /trunk/ccl/lisp-kernel/thread_manager.c
===================================================================
--- /trunk/ccl/lisp-kernel/thread_manager.c	(revision 5004)
+++ /trunk/ccl/lisp-kernel/thread_manager.c	(revision 5005)
@@ -257,4 +257,7 @@
 suspend_resume_handler(int signo, siginfo_t *info, ExceptionInformation *context)
 {
+#ifdef DARWIN_GS_HACK
+  Boolean gs_was_tcr = ensure_gs_pthread();
+#endif
   TCR *tcr = get_interrupt_tcr(false);
 
@@ -288,5 +291,10 @@
   }
 #if WAIT_FOR_RESUME_ACK
-    SEM_RAISE(tcr->suspend);
+  SEM_RAISE(tcr->suspend);
+#endif
+#ifdef DARWIN_GS_HACK
+  if (gs_was_tcr) {
+    set_gs_address(tcr);
+  }
 #endif
 #ifdef DARWIN
@@ -443,5 +451,5 @@
     tcr = calloc(1, sizeof(TCR));
 #ifdef DARWIN
-#ifdef PPC64
+#if WORD_SIZE == 64
     if (((unsigned)((natural)tcr)) != ((natural)tcr)) {
       tcr->next = chain;
@@ -495,5 +503,4 @@
   /* darwin_set_x8664_fs_reg(tcr); */
 #endif
-  tcr->linear = tcr;
 }
 
@@ -520,4 +527,8 @@
 #else
   TCR *tcr = allocate_tcr();
+#endif
+
+#ifdef X8664
+  tcr->linear = tcr;
 #endif
 
