mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
rename thread internal naming
Now GVL is not process *Global* so this patch try to use another words. * `rb_global_vm_lock_t` -> `struct rb_thread_sched` * `gvl->owner` -> `sched->running` * `gvl->waitq` -> `sched->readyq` * `rb_gvl_init` -> `rb_thread_sched_init` * `gvl_destroy` -> `rb_thread_sched_destroy` * `gvl_acquire` -> `thread_sched_to_running` # waiting -> ready -> running * `gvl_release` -> `thread_sched_to_waiting` # running -> waiting * `gvl_yield` -> `thread_sched_yield` * `GVL_UNLOCK_BEGIN` -> `THREAD_BLOCKING_BEGIN` * `GVL_UNLOCK_END` -> `THREAD_BLOCKING_END` * removed * `rb_ractor_gvl` * `rb_vm_gvl_destroy` (not used) There are GVL functions such as `rb_thread_call_without_gvl()` yet but I don't have good name to replace them. Maybe GVL stands for "Greate Valuable Lock" or something like that.
This commit is contained in:
parent
cb02324c4e
commit
1c4fc0241d
Notes:
git
2022-04-22 07:54:38 +09:00
10 changed files with 205 additions and 188 deletions
|
@ -10,7 +10,7 @@
|
|||
|
||||
typedef struct native_thread_data_struct {} native_thread_data_t;
|
||||
|
||||
typedef struct rb_global_vm_lock_struct {} rb_global_vm_lock_t;
|
||||
struct rb_thread_sched {};
|
||||
|
||||
RUBY_EXTERN struct rb_execution_context_struct *ruby_current_ec;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue