Author: Conrad Calmez <[email protected]>
Branch: stmgc-c7
Changeset: r840:3a7a4670ff52
Date: 2014-05-22 16:11 +0200
http://bitbucket.org/pypy/lang-smalltalk/changeset/3a7a4670ff52/
Log: Automated merge with bundle:/var/folders/5q/nnfvtm9x521dpj2x2qkcnlf8
0000gn/T/SourceTreeTemp.N5FsUS
diff --git a/spyvm/primitives.py b/spyvm/primitives.py
--- a/spyvm/primitives.py
+++ b/spyvm/primitives.py
@@ -1489,6 +1489,22 @@
print "STM Rendezvous"
print "Should break: %s" % rstm.should_break_transaction()
+@expose_primitive(STM_ATOMIC_ENTER, unwrap_spec=[object], no_result=True)
+def func(interp, s_frame, w_rcvr):
+ from rpython.rlib import rstm
+
+ print "STM_ATOMIC_ENTER primitive called"
+
+ rstm.increment_atomic()
+
+@expose_primitive(STM_ATOMIC_LEAVE, unwrap_spec=[object], no_result=True)
+def func(interp, s_frame, w_rcvr):
+ from rpython.rlib import rstm
+
+ print "STM_ATOMIC_LEAVE primitive called"
+
+ rstm.decrement_atomic()
+
# ___________________________________________________________________________
# BlockClosure Primitives
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit