summaryrefslogtreecommitdiff
path: root/boehm-gc/finalize.c
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-19 10:10:01 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2000-04-19 10:10:01 +0000
commita3e9d271353f431ddf2ff7c1cc0fbc9d59cd1951 (patch)
treefec69f60b37ca7ee4a47582f914dabbc7b3ee0c4 /boehm-gc/finalize.c
parentf13bf5f6901b9992d51e08626a54684e3f87b065 (diff)
downloadgcc-a3e9d271353f431ddf2ff7c1cc0fbc9d59cd1951.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@33251 138bc75d-0d04-0410-961f-82ee72b054a4
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 2ee927fe432..1ab56cee82e 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()