[pypy-commit] pypy concurrent-marksweep: Fix: these locks from the GC don't have anything to do with the GIL

arigo noreply at buildbot.pypy.org
Fri Jan 13 17:27:31 CET 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: concurrent-marksweep
Changeset: r51296:2dce8616fa62
Date: 2012-01-13 17:27 +0100
http://bitbucket.org/pypy/pypy/changeset/2dce8616fa62/

Log:	Fix: these locks from the GC don't have anything to do with the GIL

diff --git a/pypy/rpython/memory/gc/concurrentgen.py b/pypy/rpython/memory/gc/concurrentgen.py
--- a/pypy/rpython/memory/gc/concurrentgen.py
+++ b/pypy/rpython/memory/gc/concurrentgen.py
@@ -739,7 +739,7 @@
 
     def acquire(self, lock):
         if we_are_translated():
-            ll_thread.c_thread_acquirelock(lock, 1)
+            ll_thread.c_thread_acquirelock_NOAUTO(lock, 1)
         else:
             assert ll_thread.get_ident() == self.main_thread_ident
             while not self.try_acquire(lock):
@@ -749,11 +749,11 @@
                     self._reraise_from_collector_thread()
 
     def try_acquire(self, lock):
-        res = ll_thread.c_thread_acquirelock(lock, 0)
+        res = ll_thread.c_thread_acquirelock_NOAUTO(lock, 0)
         return rffi.cast(lltype.Signed, res) != 0
 
     def release(self, lock):
-        ll_thread.c_thread_releaselock(lock)
+        ll_thread.c_thread_releaselock_NOAUTO(lock)
 
     def _reraise_from_collector_thread(self):
         exc, val, tb = self.collector._exc_info
@@ -881,10 +881,10 @@
         assert self.collector_ident != -1
 
     def acquire(self, lock):
-        ll_thread.c_thread_acquirelock(lock, 1)
+        ll_thread.c_thread_acquirelock_NOAUTO(lock, 1)
 
     def release(self, lock):
-        ll_thread.c_thread_releaselock(lock)
+        ll_thread.c_thread_releaselock_NOAUTO(lock)
 
     def get_mark(self, obj):
         return self.gc.get_mark(obj)


More information about the pypy-commit mailing list