aboutsummaryrefslogtreecommitdiff
path: root/boehm-gc/finalize.c
diff options
context:
space:
mode:
authorBryce McKinlay <bryce@gcc.gnu.org>2000-04-19 11:10:01 +0100
committerBryce McKinlay <bryce@gcc.gnu.org>2000-04-19 11:10:01 +0100
commit93002327db5e5f466de60dc3f8c876cf9a56e183 (patch)
treefec69f60b37ca7ee4a47582f914dabbc7b3ee0c4 /boehm-gc/finalize.c
parent5e787f078df8900b34981443e9f968fd5c3b039c (diff)
downloadgcc-93002327db5e5f466de60dc3f8c876cf9a56e183.zip
gcc-93002327db5e5f466de60dc3f8c876cf9a56e183.tar.gz
gcc-93002327db5e5f466de60dc3f8c876cf9a56e183.tar.bz2
Imported version version 5.0alpha6.
* acinclude.m4: Bump version to 5.0a6. * configure.in: Don't use alpha_mach_dep.s. * include/private/config.h, irix_threads.c gc_watcom.asm: Delete obsolete files. From-SVN: r33251
Diffstat (limited to 'boehm-gc/finalize.c')
-rw-r--r--boehm-gc/finalize.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/boehm-gc/finalize.c b/boehm-gc/finalize.c
index 2ee927f..1ab56ce 100644
--- a/boehm-gc/finalize.c
+++ b/boehm-gc/finalize.c
@@ -694,6 +694,14 @@ GC_API void GC_finalize_all()
}
#endif
+/* Returns true if it is worth calling GC_invoke_finalizers. (Useful if */
+/* finalizers can only be called from some kind of `safe state' and */
+/* getting into that safe state is expensive.) */
+int GC_should_invoke_finalizers GC_PROTO((void))
+{
+ return GC_finalize_now != 0;
+}
+
/* Invoke finalizers for all objects that are ready to be finalized. */
/* Should be called without allocation lock. */
int GC_invoke_finalizers()