summaryrefslogtreecommitdiff
path: root/thread_pthread.c
diff options
context:
space:
mode:
authorkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-18 12:39:01 +0000
committerkosaki <kosaki@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-18 12:39:01 +0000
commite623ceb9f9092616be590b1f5e1a71ddbb18c0b3 (patch)
tree15dec0275c440735ed619bcc181727627430564a /thread_pthread.c
parentef86308a2c892d37a8961e531466c00b475275fe (diff)
* thread_pthread.c: remove GVL_DEBUG
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_pthread.c')
-rw-r--r--thread_pthread.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/thread_pthread.c b/thread_pthread.c
index d8e4d11ee8..ba202f48e0 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -40,12 +40,9 @@ static void native_cond_destroy(rb_thread_cond_t *cond);
#define USE_MONOTONIC_COND 0
#endif
-#define GVL_DEBUG 0
-
static void
__gvl_acquire(rb_vm_t *vm)
{
-
if (vm->gvl.acquired) {
vm->gvl.waiting++;
while (vm->gvl.acquired) {
@@ -127,8 +124,6 @@ gvl_yield(rb_vm_t *vm, rb_thread_t *th)
static void
gvl_init(rb_vm_t *vm)
{
- if (GVL_DEBUG) fprintf(stderr, "gvl init\n");
-
native_mutex_initialize(&vm->gvl.lock);
native_cond_initialize(&vm->gvl.cond, RB_CONDATTR_CLOCK_MONOTONIC);
native_cond_initialize(&vm->gvl.switch_cond, RB_CONDATTR_CLOCK_MONOTONIC);
@@ -141,14 +136,12 @@ gvl_init(rb_vm_t *vm)
static void
gvl_destroy(rb_vm_t *vm)
{
- if (GVL_DEBUG) fprintf(stderr, "gvl destroy\n");
native_mutex_destroy(&vm->gvl.lock);
}
static void
gvl_atfork(rb_vm_t *vm)
{
- if (GVL_DEBUG) fprintf(stderr, "gvl atfork\n");
gvl_init(vm);
gvl_acquire(vm, GET_THREAD());
}