diff options
author | Zoltan Varga <vargaz@gmail.com> | 2005-03-09 14:52:07 +0300 |
---|---|---|
committer | Zoltan Varga <vargaz@gmail.com> | 2005-03-09 14:52:07 +0300 |
commit | ddce476ba7e88c51234a7eee3dede6a0ae7f4207 (patch) | |
tree | 9c3c59cd23afd50e7012fa58672e5f59e4aed72c /libgc | |
parent | 8ed22cb54bc80958b4b92ebe7ffd8404675965f7 (diff) |
2005-03-09 Zoltan Varga <vargaz@freemail.hu>
* solaris_threads.c (GC_thread_is_registered): Add this for solaris
too.
svn path=/trunk/mono/; revision=41594
Diffstat (limited to 'libgc')
-rw-r--r-- | libgc/ChangeLog | 3 | ||||
-rw-r--r-- | libgc/solaris_threads.c | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/libgc/ChangeLog b/libgc/ChangeLog index 773515736e8..29644e50502 100644 --- a/libgc/ChangeLog +++ b/libgc/ChangeLog @@ -1,5 +1,8 @@ 2005-03-09 Zoltan Varga <vargaz@freemail.hu> + * solaris_threads.c (GC_thread_is_registered): Add this for solaris + too. + * pthread_support.c (GC_thread_is_registered): Move this outside of the #ifdef THREAD_LOCAL_ALLOC. diff --git a/libgc/solaris_threads.c b/libgc/solaris_threads.c index 5f05b19e008..0af78055e7d 100644 --- a/libgc/solaris_threads.c +++ b/libgc/solaris_threads.c @@ -624,6 +624,17 @@ GC_thread GC_lookup_thread(thread_t id) return(p); } +int GC_thread_is_registered (void) +{ + void *ptr; + + LOCK(); + ptr = (void *)GC_lookup_thread(thr_self()); + UNLOCK(); + + return ptr ? 1 : 0; +} + /* Solaris 2/Intel uses an initial stack size limit slightly bigger than the SPARC default of 8 MB. Account for this to warn only if the user has raised the limit beyond the default. |