diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rw-r--r-- | Makefile.direct | 4 | ||||
-rw-r--r-- | Makefile.dj | 4 | ||||
-rw-r--r-- | include/gc.h | 23 | ||||
-rw-r--r-- | mips_sgi_mach_dep.s | 2 | ||||
-rw-r--r-- | pthread_stop_world.c | 2 |
7 files changed, 27 insertions, 21 deletions
@@ -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. @@ -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. diff --git a/Makefile.direct b/Makefile.direct index 99101c7c..c2a2dd51 100644 --- a/Makefile.direct +++ b/Makefile.direct @@ -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. diff --git a/Makefile.dj b/Makefile.dj index c56ea7b0..94f6e839 100644 --- a/Makefile.dj +++ b/Makefile.dj @@ -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. diff --git a/include/gc.h b/include/gc.h index ba4ca32c..51c6dd22 100644 --- a/include/gc.h +++ b/include/gc.h @@ -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, diff --git a/mips_sgi_mach_dep.s b/mips_sgi_mach_dep.s index 56390280..cadacf5e 100644 --- a/mips_sgi_mach_dep.s +++ b/mips_sgi_mach_dep.s @@ -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 diff --git a/pthread_stop_world.c b/pthread_stop_world.c index 36c24dde..9f2067fc 100644 --- a/pthread_stop_world.c +++ b/pthread_stop_world.c @@ -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) |