26 #ifndef THREAD_POSIX_HPP_
27 #define THREAD_POSIX_HPP_ 1
30 # error "Do not directly include this header, include threads/thread.hpp instead"
40 #if defined(ENABLE_TLH)
49 #if defined(HAVE___THREAD)
51 #define THREADOBJECT thread_current
57 #define THREADOBJECT \
58 ((threadobject *) pthread_getspecific(thread_current_key))
60 extern pthread_key_t thread_current_key;
77 #if defined(ENABLE_GC_CACAO)
82 #if defined(ENABLE_INTRP)
98 #if defined(HAVE___THREAD)
101 t = (
threadobject *) pthread_getspecific(thread_current_key);
115 #if defined(HAVE___THREAD)
120 result = pthread_setspecific(thread_current_key, t);
124 vm_abort(
"thread_set_current: pthread_setspecific failed");
128 #endif // THREADOBJECT_POSIX_HPP_
void vm_abort(const char *text,...)
threadobject * thread_current
static void thread_set_current(threadobject *t)
Set the current Thread object.
static threadobject * thread_get_current(void)
Return the Thread object of the current thread.