+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.
# 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.
# 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.
# -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.
/* 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 */
/* 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. */
#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().
*
* 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,
# 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
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)