diff options
author | Zoltan Varga <vargaz@gmail.com> | 2005-03-09 14:00:00 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2005-03-09 14:00:00 +0300 |
commit | 8ed22cb54bc80958b4b92ebe7ffd8404675965f7 (patch) | |
tree | d8f431054d584ff3c165ba85c07ba5b6378ca457 /libgc | |
parent | d66004df05a8f386cabd5b5d6f08431cd31ad0c5 (diff) |
2005-03-09 Zoltan Varga <vargaz@freemail.hu>
* pthread_support.c (GC_thread_is_registered): Move this outside of
the #ifdef THREAD_LOCAL_ALLOC.
svn path=/trunk/mono/; revision=41593
Diffstat (limited to 'libgc')
-rw-r--r-- | libgc/ChangeLog | 5 | ||||
-rw-r--r-- | libgc/pthread_support.c | 22 |
2 files changed, 16 insertions, 11 deletions
diff --git a/libgc/ChangeLog b/libgc/ChangeLog index 22c5d88360a..773515736e8 100644 --- a/libgc/ChangeLog +++ b/libgc/ChangeLog @@ -1,3 +1,8 @@ +2005-03-09 Zoltan Varga <vargaz@freemail.hu> + + * pthread_support.c (GC_thread_is_registered): Move this outside of + the #ifdef THREAD_LOCAL_ALLOC. + 2005-03-03 Zoltan Varga <vargaz@freemail.hu> * include/gc.h pthread_support.c win32_threads.: Add diff --git a/libgc/pthread_support.c b/libgc/pthread_support.c index a33bd56350f..8b47b4d3db8 100644 --- a/libgc/pthread_support.c +++ b/libgc/pthread_support.c @@ -442,17 +442,6 @@ void * GC_local_gcj_fast_malloc(size_t lw, void * ptr_to_struct_containing_descr # endif /* !THREAD_LOCAL_ALLOC */ -int GC_thread_is_registered (void) -{ - void *ptr; - - LOCK(); - ptr = (void *)GC_lookup_thread(pthread_self()); - UNLOCK(); - - return ptr ? 1 : 0; -} - #if 0 /* To make sure that we're using LinuxThreads and not some other thread @@ -687,6 +676,17 @@ GC_thread GC_lookup_thread(pthread_t id) return(p); } +int GC_thread_is_registered (void) +{ + void *ptr; + + LOCK(); + ptr = (void *)GC_lookup_thread(pthread_self()); + UNLOCK(); + + return ptr ? 1 : 0; +} + #ifdef HANDLE_FORK /* Remove all entries from the GC_threads table, except the */ /* one for the current thread. We need to do this in the child */ |