[前][次][番号順一覧][スレッド一覧]

ruby-changes:71731

From: Koichi <ko1@a...>
Date: Thu, 14 Apr 2022 21:22:59 +0900 (JST)
Subject: [ruby-changes:71731] 9b8ce6d34c (master): fix to use `node.gvl` instead of `node.ubf`

https://git.ruby-lang.org/ruby.git/commit/?id=9b8ce6d34c

From 9b8ce6d34c49a869ee3fcbd87923a6414396738f Mon Sep 17 00:00:00 2001
From: Koichi Sasada <ko1@a...>
Date: Thu, 14 Apr 2022 16:52:08 +0900
Subject: fix to use `node.gvl` instead of `node.ubf`

The last parameter of `ccan_list_top()` is to acquire the pointer
of the top of element, so `node.ubf` is no problem. But this context
it accesses gvl list, so `node.gvl` is better.
---
 thread_pthread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/thread_pthread.c b/thread_pthread.c
index 60853cd0a3..10e42e97c8 100644
--- a/thread_pthread.c
+++ b/thread_pthread.c
@@ -331,7 +331,7 @@ gvl_release_common(rb_global_vm_lock_t *gvl) https://github.com/ruby/ruby/blob/trunk/thread_pthread.c#L331
 {
     native_thread_data_t *next;
     gvl->owner = 0;
-    next = ccan_list_top(&gvl->waitq, native_thread_data_t, node.ubf);
+    next = ccan_list_top(&gvl->waitq, native_thread_data_t, node.gvl);
     if (next) rb_native_cond_signal(&next->cond.gvlq);
 
     return next;
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]