]> granicus.if.org Git - gc/commitdiff
2005-03-09 Zoltan Varga <vargaz@freemail.hu>
authorZoltan Varga <vargaz@gmail.com>
Wed, 9 Mar 2005 11:52:07 +0000 (11:52 +0000)
committerguest <ivmai@mail.ru>
Fri, 29 Jul 2011 11:24:19 +0000 (15:24 +0400)
* solaris_threads.c (GC_thread_is_registered): Add this for solaris
too.

svn path=/trunk/mono/; revision=41594

ChangeLog
solaris_threads.c

index 71888eea568e918dd8b6b52d206bac14802b6c47..78558271e72b33ae7e05b66fc46018ce5a2e4173 100644 (file)
--- a/ChangeLog
+++ b/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.
 
index 5f05b19e008040b208a691864ad3e31c6125e047..0af78055e7da66fd3cb9971546a6ff7e851f239c 100644 (file)
@@ -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.