diff options
author | Koichi Sasada <[email protected]> | 2022-04-17 03:40:23 +0900 |
---|---|---|
committer | Koichi Sasada <[email protected]> | 2022-04-22 07:54:09 +0900 |
commit | 1c4fc0241d125879e1e5169f267f26637772f3a7 () | |
tree | d23704a9fc31fe8bfb29835ce0bdae3dc278b513 /thread_win32.h | |
parent | cb02324c4e5c7aae0add0a5c4e5adbf637d9acb0 (diff) |
rename thread internal naming
Now GVL is not process *Global* so this 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.
Notes: Merged: https://.com/ruby/ruby/pull/5814
-rw-r--r-- | thread_win32.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -30,9 +30,9 @@ typedef struct native_thread_data_struct { HANDLE interrupt_event; } native_thread_data_t; -typedef struct rb_global_vm_lock_struct { HANDLE lock; -} rb_global_vm_lock_t; typedef DWORD native_tls_key_t; // TLS index |