[pypy-commit] pypy fast-gil: Mostly just update comments
arigo
noreply at buildbot.pypy.org
Tue Jun 24 19:39:05 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch: fast-gil
Changeset: r72199:8a1061fca743
Date: 2014-06-24 19:36 +0200
http://bitbucket.org/pypy/pypy/changeset/8a1061fca743/
Log: Mostly just update comments
diff --git a/rpython/translator/c/src/thread_gil.c b/rpython/translator/c/src/thread_gil.c
--- a/rpython/translator/c/src/thread_gil.c
+++ b/rpython/translator/c/src/thread_gil.c
@@ -37,7 +37,7 @@
*/
long rpy_fastgil = 1;
-long rpy_waiting_threads = -1;
+long rpy_waiting_threads = -42; /* GIL not initialized */
static mutex_t mutex_gil_stealer;
static mutex_t mutex_gil;
@@ -67,7 +67,7 @@
/* Register me as one of the threads that is actively waiting
for the GIL. The number of such threads is found in
- rpy_lock_ready. */
+ rpy_waiting_threads. */
assert(rpy_waiting_threads >= 0);
atomic_increment(&rpy_waiting_threads);
@@ -140,7 +140,7 @@
long RPyGilYieldThread(void)
{
/* can be called even before RPyGilAllocate(), but in this case,
- 'rpy_waiting_threads' will be -1. */
+ 'rpy_waiting_threads' will be -42. */
assert(RPY_FASTGIL_LOCKED(rpy_fastgil));
if (rpy_waiting_threads <= 0)
return 0;
More information about the pypy-commit
mailing list