summary refs log tree commit diff
path: root/hurd
diff options
context:
space:
mode:
Diffstat (limited to 'hurd')
-rw-r--r--hurd/hurd/signal.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/hurd/hurd/signal.h b/hurd/hurd/signal.h
index 6583dcb5b1..ef6a8e6687 100644
--- a/hurd/hurd/signal.h
+++ b/hurd/hurd/signal.h
@@ -164,9 +164,9 @@ extern void _hurd_sigstate_delete (thread_t thread);
 _HURD_SIGNAL_H_EXTERN_INLINE struct hurd_sigstate *
 _hurd_self_sigstate (void)
 {
-  if (THREAD_SELF->_hurd_sigstate == NULL)
-    THREAD_SELF->_hurd_sigstate = _hurd_thread_sigstate (__mach_thread_self ());
-  return THREAD_SELF->_hurd_sigstate;
+  if (THREAD_GETMEM (THREAD_SELF, _hurd_sigstate) == NULL)
+    THREAD_SETMEM (THREAD_SELF, _hurd_sigstate, _hurd_thread_sigstate (__mach_thread_self ()));
+  return THREAD_GETMEM (THREAD_SELF, _hurd_sigstate);
 }
 # endif
 #endif
@@ -210,14 +210,15 @@ _hurd_critical_section_lock (void)
     return NULL;
 #endif
 
-  ss = THREAD_SELF->_hurd_sigstate;
+  ss = THREAD_GETMEM (THREAD_SELF, _hurd_sigstate);
   if (ss == NULL)
     {
       /* The thread variable is unset; this must be the first time we've
 	 asked for it.  In this case, the critical section flag cannot
 	 possible already be set.  Look up our sigstate structure the slow
 	 way.  */
-      ss = THREAD_SELF->_hurd_sigstate = _hurd_thread_sigstate (__mach_thread_self ());
+      ss = _hurd_thread_sigstate (__mach_thread_self ());
+      THREAD_SETMEM(THREAD_SELF, _hurd_sigstate, ss);
     }
 
   if (! __spin_try_lock (&ss->critical_section_lock))