* thread_pthread.c: s/__gvl_acquire/gvl_acquire_common/ and
s/__gvl_release/gvl_release_common/. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c32869dfeb
commit
ea3da57e12
@ -1,3 +1,8 @@
|
|||||||
|
Mon Jun 27 21:16:11 2011 KOSAKI Motohiro <kosaki.motohiro@gmail.com>
|
||||||
|
|
||||||
|
* thread_pthread.c: s/__gvl_acquire/gvl_acquire_common/ and
|
||||||
|
s/__gvl_release/gvl_release_common/.
|
||||||
|
|
||||||
Mon Jun 27 11:41:47 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
Mon Jun 27 11:41:47 2011 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* thread_pthread.c (rb_thread_create_timer_thread):
|
* thread_pthread.c (rb_thread_create_timer_thread):
|
||||||
|
@ -46,7 +46,7 @@ static void native_cond_destroy(rb_thread_cond_t *cond);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
__gvl_acquire(rb_vm_t *vm)
|
gvl_acquire_common(rb_vm_t *vm)
|
||||||
{
|
{
|
||||||
if (vm->gvl.acquired) {
|
if (vm->gvl.acquired) {
|
||||||
|
|
||||||
@ -75,12 +75,12 @@ static void
|
|||||||
gvl_acquire(rb_vm_t *vm, rb_thread_t *th)
|
gvl_acquire(rb_vm_t *vm, rb_thread_t *th)
|
||||||
{
|
{
|
||||||
native_mutex_lock(&vm->gvl.lock);
|
native_mutex_lock(&vm->gvl.lock);
|
||||||
__gvl_acquire(vm);
|
gvl_acquire_common(vm);
|
||||||
native_mutex_unlock(&vm->gvl.lock);
|
native_mutex_unlock(&vm->gvl.lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
__gvl_release(rb_vm_t *vm)
|
gvl_release_common(rb_vm_t *vm)
|
||||||
{
|
{
|
||||||
vm->gvl.acquired = 0;
|
vm->gvl.acquired = 0;
|
||||||
if (vm->gvl.waiting > 0)
|
if (vm->gvl.waiting > 0)
|
||||||
@ -91,7 +91,7 @@ static void
|
|||||||
gvl_release(rb_vm_t *vm)
|
gvl_release(rb_vm_t *vm)
|
||||||
{
|
{
|
||||||
native_mutex_lock(&vm->gvl.lock);
|
native_mutex_lock(&vm->gvl.lock);
|
||||||
__gvl_release(vm);
|
gvl_release_common(vm);
|
||||||
native_mutex_unlock(&vm->gvl.lock);
|
native_mutex_unlock(&vm->gvl.lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,7 +100,7 @@ gvl_yield(rb_vm_t *vm, rb_thread_t *th)
|
|||||||
{
|
{
|
||||||
native_mutex_lock(&vm->gvl.lock);
|
native_mutex_lock(&vm->gvl.lock);
|
||||||
|
|
||||||
__gvl_release(vm);
|
gvl_release_common(vm);
|
||||||
|
|
||||||
/* An another thread is processing GVL yield. */
|
/* An another thread is processing GVL yield. */
|
||||||
if (UNLIKELY(vm->gvl.wait_yield)) {
|
if (UNLIKELY(vm->gvl.wait_yield)) {
|
||||||
@ -129,7 +129,7 @@ gvl_yield(rb_vm_t *vm, rb_thread_t *th)
|
|||||||
vm->gvl.wait_yield = 0;
|
vm->gvl.wait_yield = 0;
|
||||||
native_cond_broadcast(&vm->gvl.switch_wait_cond);
|
native_cond_broadcast(&vm->gvl.switch_wait_cond);
|
||||||
acquire:
|
acquire:
|
||||||
__gvl_acquire(vm);
|
gvl_acquire_common(vm);
|
||||||
native_mutex_unlock(&vm->gvl.lock);
|
native_mutex_unlock(&vm->gvl.lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user