Author: Armin Rigo <[email protected]>
Branch: stm-thread-2
Changeset: r57337:77e328742847
Date: 2012-09-14 11:09 +0200
http://bitbucket.org/pypy/pypy/changeset/77e328742847/

Log:    Fix test_stmgcintf.c.

diff --git a/pypy/translator/stm/src_stm/et.c b/pypy/translator/stm/src_stm/et.c
--- a/pypy/translator/stm/src_stm/et.c
+++ b/pypy/translator/stm/src_stm/et.c
@@ -536,6 +536,7 @@
   g2l_clear(&d->global_to_local);
 }
 
+#if 0
 int _FakeReach(gcptr P)
 {
   if (P->h_tid & GCFLAG_GLOBAL)
@@ -547,6 +548,7 @@
     P->h_tid &= ~GCFLAG_LOCAL_COPY;
   return 1;
 }
+#endif
 
 void CommitTransaction(void)
 {
diff --git a/pypy/translator/stm/src_stm/et.h b/pypy/translator/stm/src_stm/et.h
--- a/pypy/translator/stm/src_stm/et.h
+++ b/pypy/translator/stm/src_stm/et.h
@@ -79,7 +79,7 @@
 
 void BeginTransaction(jmp_buf *);
 void BeginInevitableTransaction(void);
-int _FakeReach(gcptr);
+//int _FakeReach(gcptr);
 void CommitTransaction(void);
 void BecomeInevitable(const char *why);
 //void BeginInevitableTransaction(void);
diff --git a/pypy/translator/stm/test/test_stmgcintf.c 
b/pypy/translator/stm/test/test_stmgcintf.c
--- a/pypy/translator/stm/test/test_stmgcintf.c
+++ b/pypy/translator/stm/test/test_stmgcintf.c
@@ -269,19 +269,16 @@
 
     s2 = STM_BARRIER_P2W(&sg_global);
     assert(s2 == &sg_local);
-    assert(s2->header.h_tid == GCFLAG_LOCAL_COPY);
+    assert(s2->header.h_tid == GCFLAG_LOCAL_COPY | GCFLAG_VISITED);
     assert(s2->header.h_revision == (revision_t)&sg_global);
     assert(s2->value1 == 123);
-
-    /* simulate PerformLocalCollect */
-    _FakeReach(&s2->header);
 }
 gcptr duplicator_cb(gcptr x)
 {
     assert(x == &sg_global.header);
     sg_local = sg_global;
     sg_local.header.h_tid &= ~(GCFLAG_GLOBAL | GCFLAG_POSSIBLY_OUTDATED);
-    sg_local.header.h_tid |= GCFLAG_LOCAL_COPY;
+    sg_local.header.h_tid |= GCFLAG_LOCAL_COPY | GCFLAG_VISITED;
     return &sg_local.header;
 }
 void test_duplicator(void)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to