Author: Remi Meier <[email protected]>
Branch:
Changeset: r1626:1df0ed9de072
Date: 2015-02-16 16:34 +0100
http://bitbucket.org/pypy/stmgc/changeset/1df0ed9de072/
Log: fix demo_random.c
diff --git a/c8/demo/demo_random.c b/c8/demo/demo_random.c
--- a/c8/demo/demo_random.c
+++ b/c8/demo/demo_random.c
@@ -9,12 +9,12 @@
#include "stmgc.h"
-#define NUMTHREADS 3
+#define NUMTHREADS 4
#define STEPS_PER_THREAD 500
#define THREAD_STARTS 1000 // how many restarts of threads
#define PREBUILT_ROOTS 3
#define MAXROOTS 1000
-#define FORKS 3
+#define FORKS 0
// SUPPORT
struct node_s;
@@ -438,7 +438,7 @@
.next = NULL
};
- stm_start_inevitable_transaction(&stm_thread_local);
+ //stm_start_inevitable_transaction(&stm_thread_local);
for (i = 0; i < PREBUILT_ROOTS; i++) {
void* new_templ = malloc(sizeof(struct node_s));
memcpy(new_templ, &prebuilt_template, sizeof(struct node_s));
@@ -451,7 +451,7 @@
((nodeptr_t)prebuilt_roots[i])->my_hash = hash;
}
}
- stm_commit_transaction();
+ //stm_commit_transaction();
}
int main(void)
@@ -470,10 +470,11 @@
stm_setup();
+ setup_globals();
+
stm_register_thread_local(&stm_thread_local);
stm_rewind_jmp_enterframe(&stm_thread_local, &rjbuf);
- setup_globals();
int thread_starts = NUMTHREADS * THREAD_STARTS;
for (i = 0; i < NUMTHREADS; i++) {
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit