From: hboehm Date: Mon, 2 Jul 2007 22:01:11 +0000 (+0000) Subject: 2007-07-02 Hans Boehm X-Git-Tag: gc7_0~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6fc64f5433d4a6d6689479a67dcec5c3e9309614;p=gc 2007-07-02 Hans Boehm * include/gc_config_macros.h: Also check for IA64 when setting GC_HPUX_THREADS. * mallocx.c: Change my_bytes_allocd to signed_word. * include/gc_pthread_redirects.h: Remove obsolete Solaris threads (as opposed to pthreads) support. --- diff --git a/ChangeLog b/ChangeLog index 47f92754..4410a1ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-07-02 Hans Boehm + + * include/gc_config_macros.h: Also check for IA64 when setting + GC_HPUX_THREADS. + * mallocx.c: Change my_bytes_allocd to signed_word. + * include/gc_pthread_redirects.h: Remove obsolete Solaris threads + (as opposed to pthreads) support. + 2007-07-02 Hans Boehm * mach_dep.c (GC_with_callee_saves_pushed): Don't use getcontext() diff --git a/include/gc_config_macros.h b/include/gc_config_macros.h index 3587ed60..66abf0b1 100644 --- a/include/gc_config_macros.h +++ b/include/gc_config_macros.h @@ -80,7 +80,8 @@ # define GC_PTHREADS # endif # if !defined(__linux__) && (defined(_PA_RISC1_1) || defined(_PA_RISC2_0) \ - || defined(hppa) || defined(__HPPA)) + || defined(hppa) || defined(__HPPA)) \ + || (defined(__ia64) && defined(_HPUX_SOURCE)) # define GC_HPUX_THREADS # define GC_PTHREADS # endif diff --git a/include/gc_pthread_redirects.h b/include/gc_pthread_redirects.h index 21e9c9fa..b567f63e 100644 --- a/include/gc_pthread_redirects.h +++ b/include/gc_pthread_redirects.h @@ -5,47 +5,16 @@ #define GC_PTHREAD_REDIRECTS_H -#if defined(GC_SOLARIS_THREADS) -/* We need to intercept calls to many of the threads primitives, so */ -/* that we can locate thread stacks and stop the world. */ -/* Note also that the collector cannot see thread specific data. */ -/* Thread specific data should generally consist of pointers to */ -/* uncollectable objects (allocated with GC_malloc_uncollectable, */ -/* not the system malloc), which are deallocated using the destructor */ -/* facility in thr_keycreate. Alternatively, keep a redundant pointer */ -/* to thread specific data on the thread stack. */ -# include - int GC_thr_create(void *stack_base, size_t stack_size, - void *(*start_routine)(void *), void *arg, long flags, - thread_t *new_thread); - int GC_thr_join(thread_t wait_for, thread_t *departed, void **status); - int GC_thr_suspend(thread_t target_thread); - int GC_thr_continue(thread_t target_thread); - void * GC_dlopen(const char *path, int mode); -# define thr_create GC_thr_create -# define thr_join GC_thr_join -# define thr_suspend GC_thr_suspend -# define thr_continue GC_thr_continue -#endif /* GC_SOLARIS_THREADS */ +#if !defined(GC_USE_LD_WRAP) && defined(GC_PTHREADS) +/* We need to intercept calls to many of the threads primitives, so */ +/* that we can locate thread stacks and stop the world. */ +/* Note also that the collector cannot always see thread specific data. */ +/* Thread specific data should generally consist of pointers to */ +/* uncollectable objects (allocated with GC_malloc_uncollectable, */ +/* not the system malloc), which are deallocated using the destructor */ +/* facility in thr_keycreate. Alternatively, keep a redundant pointer */ +/* to thread specific data on the thread stack. */ -#if defined(GC_SOLARIS_PTHREADS) -# include -# include - extern int GC_pthread_create(pthread_t *new_thread, - const pthread_attr_t *attr, - void * (*thread_execp)(void *), void *arg); - extern int GC_pthread_join(pthread_t wait_for, void **status); -# define pthread_join GC_pthread_join -# define pthread_create GC_pthread_create -#endif - -#if defined(GC_SOLARIS_PTHREADS) || defined(GC_SOLARIS_THREADS) -# define dlopen GC_dlopen -#endif /* SOLARIS_THREADS || SOLARIS_PTHREADS */ - - -#if !defined(GC_USE_LD_WRAP) && defined(GC_PTHREADS) && !defined(GC_SOLARIS_PTHREADS) -/* We treat these similarly. */ # include # include diff --git a/mallocx.c b/mallocx.c index 4ee74091..8a397cf0 100644 --- a/mallocx.c +++ b/mallocx.c @@ -272,7 +272,7 @@ void *p; void **opp; size_t lw; /* Length in words. */ size_t lg; /* Length in granules. */ -word my_bytes_allocd = 0; +signed_word my_bytes_allocd = 0; struct obj_kind * ok = &(GC_obj_kinds[k]); DCL_LOCK_STATE;