X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fruntime%2Fthread.h;h=8134ff01f8de73211fd2859fbf54f3862b48bfb1;hb=7a0f4c68d94ff6c9a54c7605b6fd3cd8125c1c8c;hp=ca50539e5eea6e5d9fbed4a3adedc0ef273af6f6;hpb=9a19ce460a70a6c1de36095b3e2621116b91cc80;p=sbcl.git diff --git a/src/runtime/thread.h b/src/runtime/thread.h index ca50539..8134ff0 100644 --- a/src/runtime/thread.h +++ b/src/runtime/thread.h @@ -17,6 +17,7 @@ struct alloc_region { }; #include "genesis/symbol.h" #include "genesis/static-symbols.h" #include "genesis/thread.h" +#include "genesis/fdefn.h" #define STATE_RUNNING (make_fixnum(1)) #define STATE_SUSPENDED (make_fixnum(2)) @@ -102,6 +103,13 @@ SetTlSymbolValue(u64 tagged_symbol_pointer,lispobj val, void *thread) #endif } +/* This only works for static symbols. */ +static inline lispobj +StaticSymbolFunction(lispobj sym) +{ + return ((struct fdefn *)native_pointer(SymbolValue(sym, 0)))->fun; +} + static inline os_context_t *get_interrupt_context_for_thread(struct thread *th) {