From 158f220d2e6b44e48806480d6498466b9fc7eb62 Mon Sep 17 00:00:00 2001 From: Nikodemus Siivola Date: Sat, 17 May 2008 19:52:21 +0000 Subject: [PATCH] 1.0.16.36: fix Windows build, hopefully * Make OS-ATTR part of the thread object only on threaded platforms. --- src/compiler/generic/objdef.lisp | 1 + src/runtime/thread.c | 5 ++++- version.lisp-expr | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/compiler/generic/objdef.lisp b/src/compiler/generic/objdef.lisp index 0a4daec..2f455da 100644 --- a/src/compiler/generic/objdef.lisp +++ b/src/compiler/generic/objdef.lisp @@ -381,6 +381,7 @@ ;; Kept here so that when the thread dies we can releast the whole ;; memory we reserved. (os-address :c-type "void *" :length #!+alpha 2 #!-alpha 1) + #!+sb-thread (os-attr :c-type "pthread_attr_t *" :length #!+alpha 2 #!-alpha 1) (binding-stack-start :c-type "lispobj *" :length #!+alpha 2 #!-alpha 1) (binding-stack-pointer :c-type "lispobj *" :length #!+alpha 2 #!-alpha 1) diff --git a/src/runtime/thread.c b/src/runtime/thread.c index e2948ae..377f6b9 100644 --- a/src/runtime/thread.c +++ b/src/runtime/thread.c @@ -65,6 +65,7 @@ #define ALIEN_STACK_SIZE (1*1024*1024) /* 1Mb size chosen at random */ +#ifdef LISP_FEATURE_SB_THREAD struct thread_post_mortem { #ifdef DELAY_THREAD_POST_MORTEM struct thread_post_mortem *next; @@ -74,12 +75,12 @@ struct thread_post_mortem { os_vm_address_t os_address; }; - #ifdef DELAY_THREAD_POST_MORTEM static int pending_thread_post_mortem_count = 0; pthread_mutex_t thread_post_mortem_lock = PTHREAD_MUTEX_INITIALIZER; #endif static struct thread_post_mortem * volatile pending_thread_post_mortem = 0; +#endif int dynamic_values_bytes=TLS_SIZE*sizeof(lispobj); /* same for all threads */ struct thread * volatile all_threads; @@ -392,7 +393,9 @@ create_thread_struct(lispobj initial_function) { th->binding_stack_pointer=th->binding_stack_start; th->this=th; th->os_thread=0; +#ifdef LISP_FEATURE_SB_THREAD th->os_attr=malloc(sizeof(pthread_attr_t)); +#endif th->state=STATE_RUNNING; #ifdef LISP_FEATURE_STACK_GROWS_DOWNWARD_NOT_UPWARD th->alien_stack_pointer=((void *)th->alien_stack_start diff --git a/version.lisp-expr b/version.lisp-expr index 4c254c0..da3f078 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.16.35" +"1.0.16.36" -- 1.7.10.4