X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fthread.h;h=f1a1df9c20064775ced11ce6c3eae6fc41e8ea1d;hb=3f222e05452e95e48ad49e9b2e75fe7e16cff813;hp=948b6b693f48ae177b9d3d5be4ccef783bbe6496;hpb=e365f2f7a9c66d307b48fee70778f4eaa84bdcc0;p=sbcl.git diff --git a/src/runtime/thread.h b/src/runtime/thread.h index 948b6b6..f1a1df9 100644 --- a/src/runtime/thread.h +++ b/src/runtime/thread.h @@ -11,7 +11,7 @@ #ifdef LISP_FEATURE_GENCGC #include "gencgc-alloc-region.h" #else -#error "threading doesn't work with cheney gc yet" +struct alloc_region { }; #endif #include "genesis/symbol.h" #include "genesis/static-symbols.h" @@ -39,7 +39,7 @@ extern struct thread *find_thread_by_pid(pid_t pid); static inline lispobj SymbolValue(u32 tagged_symbol_pointer, void *thread) { struct symbol *sym= (struct symbol *) - (tagged_symbol_pointer-OTHER_POINTER_LOWTAG); + (pointer_sized_uint_t)(tagged_symbol_pointer-OTHER_POINTER_LOWTAG); #ifdef LISP_FEATURE_SB_THREAD if(thread && sym->tls_index) { lispobj r= @@ -52,7 +52,7 @@ static inline lispobj SymbolValue(u32 tagged_symbol_pointer, void *thread) { } static inline lispobj SymbolTlValue(u32 tagged_symbol_pointer, void *thread) { struct symbol *sym= (struct symbol *) - (tagged_symbol_pointer-OTHER_POINTER_LOWTAG); + (pointer_sized_uint_t)(tagged_symbol_pointer-OTHER_POINTER_LOWTAG); #ifdef LISP_FEATURE_SB_THREAD return ((union per_thread_data *)thread) ->dynamic_values[fixnum_value(sym->tls_index)]; @@ -63,7 +63,7 @@ static inline lispobj SymbolTlValue(u32 tagged_symbol_pointer, void *thread) { static inline void SetSymbolValue(u32 tagged_symbol_pointer,lispobj val, void *thread) { struct symbol *sym= (struct symbol *) - (tagged_symbol_pointer-OTHER_POINTER_LOWTAG); + (pointer_sized_uint_t)(tagged_symbol_pointer-OTHER_POINTER_LOWTAG); #ifdef LISP_FEATURE_SB_THREAD if(thread && sym->tls_index) { lispobj *pr= &(((union per_thread_data *)thread) @@ -79,7 +79,7 @@ static inline void SetSymbolValue(u32 tagged_symbol_pointer,lispobj val, void *t static inline void SetTlSymbolValue(u32 tagged_symbol_pointer,lispobj val, void *thread) { #ifdef LISP_FEATURE_SB_THREAD struct symbol *sym= (struct symbol *) - (tagged_symbol_pointer-OTHER_POINTER_LOWTAG); + (pointer_sized_uint_t)(tagged_symbol_pointer-OTHER_POINTER_LOWTAG); ((union per_thread_data *)thread) ->dynamic_values[fixnum_value(sym->tls_index)] =val; @@ -88,6 +88,7 @@ static inline void SetTlSymbolValue(u32 tagged_symbol_pointer,lispobj val, void #endif } - +int arch_os_thread_init(struct thread *thread); +extern struct thread *arch_os_get_current_thread(); #endif /* _INCLUDE_THREAD_H_ */