diff options
Diffstat (limited to 'boehm-gc/include')
-rw-r--r-- | boehm-gc/include/gc.h | 20 | ||||
-rw-r--r-- | boehm-gc/include/gc_config.h.in | 6 | ||||
-rw-r--r-- | boehm-gc/include/gc_ext_config.h.in | 2 | ||||
-rw-r--r-- | boehm-gc/include/gc_pthread_redirects.h | 2 |
4 files changed, 23 insertions, 7 deletions
diff --git a/boehm-gc/include/gc.h b/boehm-gc/include/gc.h index e6ab2c608c4..5ba1f4becfe 100644 --- a/boehm-gc/include/gc.h +++ b/boehm-gc/include/gc.h @@ -69,7 +69,6 @@ extern "C" { # endif - /* Define word and signed_word to be unsigned and signed types of the */ /* size as char * or void *. There seems to be no way to do this */ /* even semi-portably. The following is probably no better/worse */ @@ -912,6 +911,25 @@ GC_API void (*GC_is_visible_print_proc) # if defined(PCR) || defined(GC_SOLARIS_THREADS) || \ defined(GC_PTHREADS) || defined(GC_WIN32_THREADS) /* Any flavor of threads except SRC_M3. */ + +/* Register the current thread as a new thread whose stack(s) should */ +/* be traced by the GC. */ +/* If a platform does not implicitly do so, this must be called before */ +/* a thread can allocate garbage collected memory, or assign pointers */ +/* to the garbage collected heap. Once registered, a thread will be */ +/* stopped during garbage collections. */ +GC_API void GC_register_my_thread GC_PROTO((void)); + +/* Register the current thread, with the indicated stack base, as */ +/* a new thread whose stack(s) should be traced by the GC. If a */ +/* platform does not implicitly do so, this must be called before a */ +/* thread can allocate garbage collected memory, or assign pointers */ +/* to the garbage collected heap. Once registered, a thread will be */ +/* stopped during garbage collections. */ +GC_API void GC_unregister_my_thread GC_PROTO((void)); + +GC_API GC_PTR GC_get_thread_stack_base GC_PROTO((void)); + /* This returns a list of objects, linked through their first */ /* word. Its use can greatly reduce lock contention problems, since */ /* the allocation lock can be acquired and released many fewer times. */ diff --git a/boehm-gc/include/gc_config.h.in b/boehm-gc/include/gc_config.h.in index 401de609ba6..5055b502459 100644 --- a/boehm-gc/include/gc_config.h.in +++ b/boehm-gc/include/gc_config.h.in @@ -45,9 +45,6 @@ /* support for Tru64 pthreads */ #undef GC_OSF1_THREADS -/* symbol version of pthread_create */ -#undef GC_PTHREAD_SYM_VERSION - /* support for Solaris pthreads */ #undef GC_SOLARIS_PTHREADS @@ -81,6 +78,9 @@ /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H +/* Define to 1 if you have the `pthread_getattr_np' function. */ +#undef HAVE_PTHREAD_GETATTR_NP + /* Define to 1 if you have the <stdint.h> header file. */ #undef HAVE_STDINT_H diff --git a/boehm-gc/include/gc_ext_config.h.in b/boehm-gc/include/gc_ext_config.h.in index 716143dc62f..219ba2fb8c8 100644 --- a/boehm-gc/include/gc_ext_config.h.in +++ b/boehm-gc/include/gc_ext_config.h.in @@ -4,4 +4,4 @@ is used by libjava/include/boehm-gc.h. */ #undef THREAD_LOCAL_ALLOC -#undef GC_PTHREAD_SYM_VERSION +#undef HAVE_PTHREAD_GETATTR_NP diff --git a/boehm-gc/include/gc_pthread_redirects.h b/boehm-gc/include/gc_pthread_redirects.h index f9d4939affc..842518cfcc4 100644 --- a/boehm-gc/include/gc_pthread_redirects.h +++ b/boehm-gc/include/gc_pthread_redirects.h @@ -68,9 +68,7 @@ # undef pthread_detach #endif -#ifndef GC_PTHREAD_SYM_VERSION # define pthread_create GC_pthread_create -#endif # define pthread_join GC_pthread_join # define pthread_detach GC_pthread_detach |