From: Zoltan Varga Date: Wed, 9 Mar 2005 11:00:00 +0000 (+0000) Subject: 2005-03-09 Zoltan Varga X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dba783d40998f9e267ccaaa8b25579f40cfc09ca;p=gc 2005-03-09 Zoltan Varga * pthread_support.c (GC_thread_is_registered): Move this outside of the #ifdef THREAD_LOCAL_ALLOC. svn path=/trunk/mono/; revision=41593 --- diff --git a/ChangeLog b/ChangeLog index 9f0c7bdc..71888eea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-03-09 Zoltan Varga + + * pthread_support.c (GC_thread_is_registered): Move this outside of + the #ifdef THREAD_LOCAL_ALLOC. + 2005-03-03 Zoltan Varga * include/gc.h pthread_support.c win32_threads.: Add diff --git a/pthread_support.c b/pthread_support.c index a1130ab2..c39474db 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -400,17 +400,6 @@ GC_PTR GC_local_gcj_malloc(size_t bytes, # 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 @@ -645,6 +634,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 */