diff options
author | Koichi Sasada <ko1@atdot.net> | 2022-04-17 03:40:23 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2022-04-22 07:54:09 +0900 |
commit | 1c4fc0241d125879e1e5169f267f26637772f3a7 (patch) | |
tree | d23704a9fc31fe8bfb29835ce0bdae3dc278b513 /vm_core.h | |
parent | cb02324c4e5c7aae0add0a5c4e5adbf637d9acb0 (diff) | |
download | ruby-1c4fc0241d125879e1e5169f267f26637772f3a7.tar.gz |
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.
Diffstat (limited to 'vm_core.h')
-rw-r--r-- | vm_core.h | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -1735,8 +1735,6 @@ VALUE rb_vm_call_kw(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc, const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat); MJIT_STATIC void rb_vm_pop_frame(rb_execution_context_t *ec); -void rb_gvl_destroy(rb_global_vm_lock_t *gvl); - void rb_thread_start_timer_thread(void); void rb_thread_stop_timer_thread(void); void rb_thread_reset_timer_thread(void); |