0.9.5.35:
[sbcl.git] / src / runtime / thread.h
index 6aa8f60..9e0bd15 100644 (file)
@@ -31,7 +31,7 @@ union per_thread_data {
     lispobj dynamic_values[1];  /* actually more like 4000 or so */
 };
 
-extern struct thread *all_threads;
+extern struct thread * volatile all_threads;
 extern int dynamic_values_bytes;
 
 #ifdef LISP_FEATURE_SB_THREAD
@@ -50,7 +50,7 @@ static inline lispobj SymbolValue(u64 tagged_symbol_pointer, void *thread) {
         lispobj r=
             ((union per_thread_data *)thread)
             ->dynamic_values[fixnum_value(sym->tls_index)];
-        if(r!=UNBOUND_MARKER_WIDETAG) return r;
+        if(r!=NO_TLS_VALUE_MARKER_WIDETAG) return r;
     }
 #endif
     return sym->value;
@@ -73,7 +73,7 @@ static inline void SetSymbolValue(u64 tagged_symbol_pointer,lispobj val, void *t
     if(thread && sym->tls_index) {
         lispobj *pr= &(((union per_thread_data *)thread)
                        ->dynamic_values[fixnum_value(sym->tls_index)]);
-        if(*pr!= UNBOUND_MARKER_WIDETAG) {
+        if(*pr!=NO_TLS_VALUE_MARKER_WIDETAG) {
             *pr=val;
             return;
         }
@@ -124,10 +124,14 @@ static inline struct thread *arch_os_get_current_thread() {
 #define thread_self pthread_self
 #define thread_kill pthread_kill
 #define thread_sigmask pthread_sigmask
+#define thread_mutex_lock(l) pthread_mutex_lock(l)
+#define thread_mutex_unlock(l) pthread_mutex_unlock(l)
 #else
 #define thread_self getpid
 #define thread_kill kill
 #define thread_sigmask sigprocmask
+#define thread_mutex_lock(l)
+#define thread_mutex_unlock(l)
 #endif
 
 extern void create_initial_thread(lispobj);