+2009-12-08 Ivan Maidanski <ivmai@mail.ru>
+
+ * tests/test.c (reverse_test): Comment out a check for MSWIN32
+ (when determing BIG value) assuming outdated win32S.
+ * tests/test.c (reverse_test): Rename to reverse_test_inner;
+ change the declaration (to be of GC_fn_type); call itself thru
+ GC_call_with_gc_active() if the argument is zero.
+ * tests/test.c (reverse_test): New function added calling
+ reverse_test_inner thru GC_do_blocking (to test GC_do_blocking and
+ GC_call_with_gc_active).
+
2009-12-08 Ivan Maidanski <ivmai@mail.ru> (with input from Marcos Dione)
* doc/README.macros (IGNORE_DYNAMIC_LOADING, PLATFORM_ANDROID):
* Repeatedly reverse lists built out of very different sized cons cells.
* Check that we didn't lose anything.
*/
-void reverse_test(void)
+void *GC_CALLBACK reverse_test_inner(void *data)
{
int i;
sexpr b;
sexpr d;
sexpr e;
sexpr *f, *g, *h;
-# if defined(MSWIN32) || defined(MACOS)
+
+ if (data == 0) {
+ /* This stack frame is not guaranteed to be scanned. */
+ return GC_call_with_gc_active(reverse_test_inner, (void*)(word)1);
+ }
+
+# if /*defined(MSWIN32) ||*/ defined(MACOS)
/* Win32S only allows 128K stacks */
# define BIG 1000
# else
# endif
*(volatile void **)&b = 0;
*(volatile void **)&c = 0;
+ return 0;
+}
+
+void reverse_test(void)
+{
+ /* Test GC_do_blocking/GC_call_with_gc_active. */
+ (void)GC_do_blocking(reverse_test_inner, 0);
}
#undef a