[pypy-commit] stmgc default: Add stm_{minor, major}_collect() with the semantics needed
arigo
noreply at buildbot.pypy.org
Sat Jul 6 18:52:38 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r364:88246694721e
Date: 2013-07-06 16:20 +0200
http://bitbucket.org/pypy/stmgc/changeset/88246694721e/
Log: Add stm_{minor,major}_collect() with the semantics needed for the
users.
diff --git a/c4/stmgc.h b/c4/stmgc.h
--- a/c4/stmgc.h
+++ b/c4/stmgc.h
@@ -109,7 +109,10 @@
void stm_abort_info_pop(long count);
char *stm_inspect_abort_info(void);
+/* mostly for debugging support */
void stm_abort_and_retry(void);
+void stm_minor_collect(void);
+void stm_major_collect(void);
/**************** END OF PUBLIC INTERFACE *****************/
diff --git a/c4/stmsync.c b/c4/stmsync.c
--- a/c4/stmsync.c
+++ b/c4/stmsync.c
@@ -328,6 +328,18 @@
AbortNowIfDelayed(); /* if another thread ran a major GC */
}
+void stm_minor_collect(void)
+{
+ stmgc_minor_collect();
+ stmgcpage_possibly_major_collect(0);
+}
+
+void stm_major_collect(void)
+{
+ stmgc_minor_collect();
+ stmgcpage_possibly_major_collect(1);
+}
+
/************************************************************/
/***** Prebuilt roots, added in the list as the transaction that changed
More information about the pypy-commit
mailing list