X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fruntime%2Fthread.c;h=7c85b3e4dbb36328b5b264bd77c76df1b747927e;hb=127fd3d2fb843c6bb7ad0763e143d81877e760e8;hp=a838c7d550095bf42aeb6a4cbdac0c3199aa95de;hpb=5759fa78f2289c7e891aaded2a54e069b8bdac01;p=sbcl.git diff --git a/src/runtime/thread.c b/src/runtime/thread.c index a838c7d..7c85b3e 100644 --- a/src/runtime/thread.c +++ b/src/runtime/thread.c @@ -91,6 +91,9 @@ pthread_mutex_t all_threads_lock = PTHREAD_MUTEX_INITIALIZER; #ifdef LOCK_CREATE_THREAD static pthread_mutex_t create_thread_lock = PTHREAD_MUTEX_INITIALIZER; #endif +#ifdef LISP_FEATURE_GCC_TLS +__thread struct thread *current_thread; +#endif #endif #if defined(LISP_FEATURE_X86) || defined(LISP_FEATURE_X86_64) @@ -383,7 +386,7 @@ create_thread_struct(lispobj initial_function) { * padding. */ aligned_spaces = (void *)((((unsigned long)(char *)spaces) + BACKEND_PAGE_SIZE - 1) - & ~(BACKEND_PAGE_SIZE - 1)); + & ~(unsigned long)(BACKEND_PAGE_SIZE - 1)); per_thread=(union per_thread_data *) (aligned_spaces+ THREAD_CONTROL_STACK_SIZE+ @@ -519,7 +522,7 @@ boolean create_os_thread(struct thread *th,os_thread_t *kid_tid) pthread_attr_t attr; sigset_t newset,oldset; boolean r=1; - int retcode, initcode, sizecode, addrcode; + int retcode = 0, initcode; FSHOW_SIGNAL((stderr,"/create_os_thread: creating new thread\n")); @@ -548,7 +551,7 @@ boolean create_os_thread(struct thread *th,os_thread_t *kid_tid) #undef CONTROL_STACK_ADJUST (retcode = pthread_create (kid_tid,&attr,(void *(*)(void *))new_thread_trampoline,th))) { - FSHOW_SIGNAL((stderr, "init, size, addr = %d, %d, %d\n", initcode, sizecode, addrcode)); + FSHOW_SIGNAL((stderr, "init = %d\n", initcode)); FSHOW_SIGNAL((stderr, printf("pthread_create returned %d, errno %d\n", retcode, errno))); FSHOW_SIGNAL((stderr, "wanted stack size %d, min stack size %d\n", THREAD_CONTROL_STACK_SIZE-16, PTHREAD_STACK_MIN));