]> granicus.if.org Git - gc/commitdiff
2009-05-22 Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski, diff61)
authorhboehm <hboehm>
Fri, 22 May 2009 23:38:02 +0000 (23:38 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:44 +0000 (21:06 +0400)
* Makefile, Makefile.direct: GC_SOLAIS_PTHREADS was replaced
by GC_SOLARIS_THREADS.
* include/gc.h: Improve finalizer documentation.
* mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
* pthread_stop_world.c, Makefile.dj: Fix typos.

ChangeLog
Makefile
Makefile.direct
Makefile.dj
include/gc.h
mips_sgi_mach_dep.s
pthread_stop_world.c

index 5543c2adaefd1520cbe541da2384985d0fd0fb9a..cbd98ce9061fe3b507043744b203c68d60399cce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-05-22  Hans Boehm <Hans.Boehm@hp.com> (Really Ivan Maidanski, diff61)
+       * Makefile, Makefile.direct: GC_SOLAIS_PTHREADS was replaced
+       by GC_SOLARIS_THREADS.
+       * include/gc.h: Improve finalizer documentation.
+       * mips_sgi_mach_dep.s: Replace _MIPS_SIM_ABI32 with _ABIO32.
+       * pthread_stop_world.c, Makefile.dj: Fix typos.
+
 2009-05-21  Hans Boehm <Hans.Boehm@hp.com> 
        * win32_threads.c (GC_new_thread): Make first_thread
        visible to the whole file.
index 65678b20cb163a86bf3fc837989de822b654ba75..b7f99fd19e2c38a2539eaada71fa9e660a68e634 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -67,12 +67,8 @@ HOSTCFLAGS=$(CFLAGS)
 #   This causes the collector to assume that all inaccessible
 #   objects should have been explicitly deallocated, and reports exceptions.
 #   Finalization and the test program are not usable in this mode.
-# -DGC_SOLARIS_THREADS enables support for Solaris (thr_) threads.
-#   (Clients should also define GC_SOLARIS_THREADS and then include
-#   gc.h before performing thr_ or dl* or GC_ operations.)
+# -DGC_SOLARIS_THREADS enables support for Solaris pthreads.
 #   Must also define -D_REENTRANT.
-# -DGC_SOLARIS_PTHREADS enables support for Solaris pthreads.
-#   (Internally this define GC_SOLARIS_THREADS as well.)
 # -DGC_IRIX_THREADS enables support for Irix pthreads.  See README.irix.
 # -DGC_HPUX_THREADS enables support for HP/UX 11 pthreads.
 #   Also requires -D_REENTRANT or -D_POSIX_C_SOURCE=199506L. See README.hp.
index 99101c7cd23c0afbdc6a13527b4316eb6cd5284d..c2a2dd51fed7f9fbf06aaf4961e307728dacecd8 100644 (file)
@@ -74,9 +74,7 @@ HOSTCFLAGS=$(CFLAGS)
 # interception can be used on a few platforms.
 # -DGC_THREADS should set the appropriate one of the below macros,
 #   except -DGC_WIN32_PTHREADS, which must be set explicitly.
-# -DGC_SOLARIS_PTHREADS enables support for Solaris pthreads.
-#   (Clients should also define GC_SOLARIS_THREADS and then include
-#   gc.h before performing thr_ or dl* or GC_ operations.)
+# -DGC_SOLARIS_THREADS enables support for Solaris pthreads.
 #   Must also define -D_REENTRANT.
 # -DGC_IRIX_THREADS enables support for Irix pthreads.  See README.irix.
 # -DGC_HPUX_THREADS enables support for HP/UX 11 pthreads.
index c56ea7b03f60ddd44845fe380ba5aa6a792179ab..94f6e83947f1d7772d422b5173779bf639bdae25 100644 (file)
@@ -84,9 +84,9 @@ CFLAGS= -gstabs+ -O2 -I$(srcdir)/include -DATOMIC_UNCOLLECTABLE -DALL_INTERIOR_P
 # -DJAVA_FINALIZATION makes it somewhat safer to finalize objects out of
 #   order by specifying a nonstandard finalization mark procedure  (see
 #   finalize.c).  Objects reachable from finalizable objects will be marked
-#   in a sepearte postpass, and hence their memory won't be reclaimed.
+#   in a separate postpass, and hence their memory won't be reclaimed.
 #   Not recommended unless you are implementing a language that specifies
-#   these semantics.  Since 5.0, determines only only the initial value
+#   these semantics.  Since 5.0, determines only the initial value
 #   of GC_java_finalization variable.
 # -DFINALIZE_ON_DEMAND causes finalizers to be run only in response
 #   to explicit GC_invoke_finalizers() calls.
index ba4ca32cc1eae06ed334b04b8424b987684ee453..51c6dd2261bcaa3ec1dfb3b6ef69f5572723987c 100644 (file)
@@ -664,10 +664,14 @@ GC_API void GC_CALL GC_debug_register_finalizer
        /* All but the last finalizer registered for an object  */
        /* is ignored.                                          */
        /* Finalization may be removed by passing 0 as fn.      */
-       /* Finalizers are implicitly unregistered just before   */
-       /* they are invoked.                                    */
+       /* Finalizers are implicitly unregistered when they are */
+       /* enqueued for finalization (i.e. become ready to be   */
+       /* finalized).                                          */
        /* The old finalizer and client data are stored in      */
-       /* *ofn and *ocd.                                       */ 
+       /* *ofn and *ocd.  (ofn and/or ocd may be NULL.         */
+       /* The allocation lock is held while *ofn and *ocd are  */
+       /* updated.  In case of error (no memory to register    */
+       /* new finalizer), *ofn and *ocd remain unchanged.)     */
        /* Fn is never invoked on an accessible object,         */
        /* provided hidden pointers are converted to real       */
        /* pointers only if the allocation lock is held, and    */
@@ -677,8 +681,10 @@ GC_API void GC_CALL GC_debug_register_finalizer
        /* a signal, the object may be left with no             */
        /* finalization, even if neither the old nor new        */
        /* finalizer were NULL.                                 */
-       /* Obj should be the non-NULL starting address of an    */
-       /* object allocated by GC_malloc or friends.            */
+       /* Obj should be the starting address of an object      */
+       /* allocated by GC_malloc or friends. Obj may also be   */
+       /* NULL or point to something outside GC heap (in this  */
+       /* case, fn is ignored, *ofn and *ocd are set to NULL). */
        /* Note that any garbage collectable object referenced  */
        /* by cd will be considered accessible until the        */
        /* finalizer is invoked.                                */
@@ -1061,7 +1067,8 @@ GC_API void GC_CALL GC_register_has_static_roots_callback
 #endif
   /*
    * All threads must be created using GC_CreateThread or GC_beginthreadex,
-   * or must explicitly call GC_register_my_thread,
+   * or must explicitly call GC_register_my_thread
+   * (and call GC_unregister_my_thread before thread termination),
    * so that they will be recorded in the thread table.
    * For backwards compatibility, it is possible to build the GC
    * with GC_DLL defined, and to call GC_use_DllMain().
@@ -1070,9 +1077,7 @@ GC_API void GC_CALL GC_register_has_static_roots_callback
    *
    * Currently the collector expects all threads to fall through and
    * terminate normally, or call GC_endthreadex() or GC_ExitThread,
-   * so that the thread is properly unregistered.  (An explicit call
-   * to GC_unregister_my_thread() should also work, but risks unregistering
-   * the thread twice.)
+   * so that the thread is properly unregistered.
    */
    GC_API HANDLE WINAPI GC_CreateThread(
       LPSECURITY_ATTRIBUTES lpThreadAttributes,
index 56390280a718845293455066595083420c477f8f..cadacf5ed4d8888bec58bc8d9fd72041f51b574a 100644 (file)
@@ -24,7 +24,7 @@
 #   endif
     SAVE_GP(GPOFF)
     REG_S      ra,RAOFF(sp)
-#   if (_MIPS_SIM == _MIPS_SIM_ABI32)
+#   if (_MIPS_SIM == _ABIO32)
        call_push($2)
        call_push($3)
 #   endif
index 36c24ddece60ded8042f2d694a313063290ee66d..9f2067fc2a098ad1605fdde876d3b4236a9bc287 100644 (file)
@@ -535,7 +535,7 @@ void GC_stop_init(void) {
        ABORT("Cannot set SIG_THR_RESTART handler");
     }
 
-    /* Initiialize suspend_handler_mask. It excludes SIG_THR_RESTART. */
+    /* Initialize suspend_handler_mask. It excludes SIG_THR_RESTART. */
       if (sigfillset(&suspend_handler_mask) != 0) ABORT("sigfillset() failed");
       GC_remove_allowed_signals(&suspend_handler_mask);
       if (sigdelset(&suspend_handler_mask, SIG_THR_RESTART) != 0)