Ruby: rb_vm_struct Struct Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Data Fields
rb_vm_struct Struct Reference

`#include <vm_core.h>`

## Data Fields
VALUE | self
struct {
struct list_head set
unsigned int cnt
unsigned int blocking_cnt
struct rb_ractor_struct * main_ractor
struct rb_thread_struct * main_thread
struct {
rb_nativethread_lock_t lock
struct rb_ractor_struct * lock_owner
unsigned int lock_rec
bool barrier_waiting
unsigned int barrier_cnt
rb_nativethread_cond_t barrier_cond
rb_nativethread_cond_t terminate_cond
bool terminate_waiting
} sync
} | ractor
rb_serial_t | fork_gen
rb_nativethread_lock_t | waitpid_lock
struct list_head | waiting_pids
struct list_head | waiting_grps
struct list_head | waiting_fds
volatile int | ubf_async_safe
unsigned int | running: 1
unsigned int | thread_abort_on_exception: 1
unsigned int | thread_report_on_exception: 1
unsigned int | thread_ignore_deadlock: 1
VALUE | mark_object_ary
const VALUE | special_exceptions [ruby_special_error_count]
VALUE | top_self
VALUE | load_path
VALUE | load_path_snapshot
VALUE | load_path_check_cache
VALUE | expanded_load_path
VALUE | loaded_features
VALUE | loaded_features_snapshot
struct st_table * | loaded_features_index
struct st_table * | loading_table
struct {
VALUE cmd [RUBY_NSIG]
} | trap_list
struct st_table * | ensure_rollback_table
struct rb_postponed_job_struct * | postponed_job_buffer
rb_atomic_t | postponed_job_index
int | src_encoding_index
struct list_head | workqueue
rb_nativethread_lock_t | workqueue_lock
VALUE | orig_progname
VALUE | progname
VALUE | coverages
int | coverage_mode
st_table * | defined_module_hash
struct rb_objspace * | objspace
rb_at_exit_list * | at_exit
VALUE * | defined_strings
st_table * | frozen_strings
const struct rb_builtin_function * | builtin_function_table
int | builtin_inline_index
struct rb_id_table * | negative_cme_table
const struct rb_callcache * | global_cc_cache_table [VM_GLOBAL_CC_CACHE_TABLE_SIZE]
struct {
size_t thread_vm_stack_size
size_t thread_machine_stack_size
size_t fiber_vm_stack_size
size_t fiber_machine_stack_size
} | default_params
short | redefined_flag [BOP_LAST_]

## Detailed Description

Definition at line 564 of file vm_core.h.

## Field Documentation

## ◆ at_exit

rb_at_exit_list* rb_vm_struct::at_exit

Definition at line 651 of file vm_core.h.

Referenced by ruby_vm_at_exit().

## ◆ barrier_cnt

unsigned int rb_vm_struct::barrier_cnt

Definition at line 583 of file vm_core.h.

Referenced by rb_vm_barrier().

## ◆ barrier_cond

rb_nativethread_cond_t rb_vm_struct::barrier_cond

Definition at line 584 of file vm_core.h.

Referenced by Init_BareVM(), and rb_vm_barrier().

## ◆ barrier_waiting

bool rb_vm_struct::barrier_waiting

Definition at line 582 of file vm_core.h.

Referenced by rb_vm_barrier().

## ◆ blocking_cnt

unsigned int rb_vm_struct::blocking_cnt

Definition at line 570 of file vm_core.h.

Referenced by rb_vm_barrier(), and rb_vm_ractor_blocking_cnt_dec().

## ◆ builtin_function_table

const struct rb_builtin_function* rb_vm_struct::builtin_function_table

Definition at line 656 of file vm_core.h.

Referenced by rb_load_with_builtin_functions().

## ◆ builtin_inline_index

int rb_vm_struct::builtin_inline_index

Definition at line 657 of file vm_core.h.

Referenced by rb_load_with_builtin_functions().

## ◆ cmd

VALUE rb_vm_struct::cmd[RUBY_NSIG]

Definition at line 627 of file vm_core.h.

Referenced by rb_signal_exec(), rb_vm_mark(), and rb_vm_trap_exit().

## ◆ cnt

unsigned int rb_vm_struct::cnt

Definition at line 569 of file vm_core.h.

Referenced by rb_ractor_terminate_all(), and rb_vm_barrier().

## ◆ coverage_mode

int rb_vm_struct::coverage_mode

Definition at line 645 of file vm_core.h.

## ◆ coverages

VALUE rb_vm_struct::coverages

Definition at line 644 of file vm_core.h.

Referenced by rb_vm_mark(), and rb_vm_update_references().

## ◆

struct { ... } rb_vm_struct::default_params

Referenced by Init_Cont().

## ◆ defined_module_hash

st_table* rb_vm_struct::defined_module_hash

Definition at line 647 of file vm_core.h.

Referenced by Init_vm_objects(), rb_vm_add_root_module(), and rb_vm_mark().

## ◆ defined_strings

VALUE* rb_vm_struct::defined_strings

Definition at line 653 of file vm_core.h.

## ◆ ensure_rollback_table

struct st_table* rb_vm_struct::ensure_rollback_table

Definition at line 631 of file vm_core.h.

## ◆ expanded_load_path

VALUE rb_vm_struct::expanded_load_path

Definition at line 619 of file vm_core.h.

Referenced by Init_load(), rb_get_expanded_load_path(), rb_vm_mark(), and rb_vm_update_references().

## ◆ fiber_machine_stack_size

size_t rb_vm_struct::fiber_machine_stack_size

Definition at line 675 of file vm_core.h.

Referenced by Init_Cont().

## ◆ fiber_vm_stack_size

size_t rb_vm_struct::fiber_vm_stack_size

Definition at line 674 of file vm_core.h.

Referenced by Init_Cont().

## ◆ fork_gen

rb_serial_t rb_vm_struct::fork_gen

Definition at line 596 of file vm_core.h.

## ◆ frozen_strings

st_table* rb_vm_struct::frozen_strings

Definition at line 654 of file vm_core.h.

Referenced by Init_vm_objects(), rb_vm_update_references(), and ruby_vm_destruct().

## ◆ global_cc_cache_table

const struct rb_callcache* rb_vm_struct::global_cc_cache_table[VM_GLOBAL_CC_CACHE_TABLE_SIZE]

Definition at line 664 of file vm_core.h.

Referenced by rb_vm_mark().

## ◆ load_path

VALUE rb_vm_struct::load_path

Definition at line 616 of file vm_core.h.

Referenced by Init_load(), rb_get_expanded_load_path(), rb_vm_mark(), and rb_vm_update_references().

## ◆ load_path_check_cache

VALUE rb_vm_struct::load_path_check_cache

Definition at line 618 of file vm_core.h.

Referenced by Init_load(), rb_get_expanded_load_path(), rb_vm_mark(), and rb_vm_update_references().

## ◆ load_path_snapshot

VALUE rb_vm_struct::load_path_snapshot

Definition at line 617 of file vm_core.h.

Referenced by Init_load(), rb_get_expanded_load_path(), rb_vm_mark(), and rb_vm_update_references().

## ◆ loaded_features

VALUE rb_vm_struct::loaded_features

Definition at line 620 of file vm_core.h.

Referenced by Init_load(), rb_vm_bugreport(), rb_vm_mark(), and rb_vm_update_references().

## ◆ loaded_features_index

struct st_table* rb_vm_struct::loaded_features_index

Definition at line 622 of file vm_core.h.

Referenced by Init_load().

## ◆ loaded_features_snapshot

VALUE rb_vm_struct::loaded_features_snapshot

Definition at line 621 of file vm_core.h.

Referenced by Init_load(), rb_vm_mark(), and rb_vm_update_references().

## ◆ loading_table

struct st_table* rb_vm_struct::loading_table

Definition at line 623 of file vm_core.h.

Referenced by Init_vm_objects(), rb_vm_mark(), and ruby_vm_destruct().

## ◆ lock

rb_nativethread_lock_t rb_vm_struct::lock

Definition at line 577 of file vm_core.h.

Referenced by Init_BareVM().

## ◆ lock_owner

struct rb_ractor_struct* rb_vm_struct::lock_owner

Definition at line 578 of file vm_core.h.

Referenced by rb_vm_barrier().

## ◆ lock_rec

unsigned int rb_vm_struct::lock_rec

Definition at line 579 of file vm_core.h.

Referenced by rb_vm_lock_body(), and rb_vm_unlock_body().

## ◆ main_ractor

struct rb_ractor_struct* rb_vm_struct::main_ractor

Definition at line 572 of file vm_core.h.

Referenced by Init_BareVM(), Init_VM(), rb_ractor_dump(), rb_ractor_terminate_all(), and rb_vm_main_ractor_ec().

## ◆ main_thread

struct rb_thread_struct* rb_vm_struct::main_thread

Definition at line 573 of file vm_core.h.

Referenced by Init_VM(), rb_nogvl(), rb_thread_kill(), rb_threadptr_execute_interrupts(), rb_threadptr_signal_exit(), rb_threadptr_signal_raise(), and ruby_vm_destruct().

## ◆ mark_object_ary

VALUE rb_vm_struct::mark_object_ary

Definition at line 611 of file vm_core.h.

Referenced by Init_vm_objects(), rb_vm_mark(), and rb_vm_update_references().

## ◆ negative_cme_table

struct rb_id_table* rb_vm_struct::negative_cme_table

Definition at line 659 of file vm_core.h.

Referenced by Init_BareVM(), and rb_vm_mark().

## ◆ objspace

struct rb_objspace* rb_vm_struct::objspace

Definition at line 649 of file vm_core.h.

Referenced by Init_BareVM(), Init_VM(), and ruby_vm_destruct().

## ◆ orig_progname

VALUE rb_vm_struct::orig_progname

Definition at line 643 of file vm_core.h.

Referenced by rb_vm_mark(), and rb_vm_update_references().

## ◆ postponed_job_buffer

struct rb_postponed_job_struct* rb_vm_struct::postponed_job_buffer

Definition at line 634 of file vm_core.h.

Referenced by Init_vm_postponed_job(), rb_postponed_job_flush(), and rb_postponed_job_register_one().

## ◆ postponed_job_index

rb_atomic_t rb_vm_struct::postponed_job_index

Definition at line 635 of file vm_core.h.

Referenced by Init_vm_postponed_job(), rb_postponed_job_flush(), rb_postponed_job_register(), and rb_postponed_job_register_one().

## ◆ progname

VALUE rb_vm_struct::progname

Definition at line 643 of file vm_core.h.

Referenced by rb_vm_bugreport().

## ◆

struct { ... } rb_vm_struct::ractor

Referenced by Init_BareVM(), Init_VM(), rb_nogvl(), rb_ractor_dump(), rb_ractor_terminate_all(), rb_thread_kill(), rb_threadptr_execute_interrupts(), rb_threadptr_signal_exit(), rb_threadptr_signal_raise(), rb_vm_barrier(), rb_vm_each_stack_value(), rb_vm_lock_body(), rb_vm_main_ractor_ec(), rb_vm_mark(), rb_vm_ractor_blocking_cnt_dec(), rb_vm_unlock_body(), and ruby_vm_destruct().

## ◆ redefined_flag

short rb_vm_struct::redefined_flag[BOP_LAST_]

Definition at line 678 of file vm_core.h.

## ◆ running

unsigned int rb_vm_struct::running

Definition at line 605 of file vm_core.h.

## ◆ self

VALUE rb_vm_struct::self

Definition at line 565 of file vm_core.h.

Referenced by Init_VM().

## ◆ set

struct list_head rb_vm_struct::set

Definition at line 568 of file vm_core.h.

Referenced by rb_ractor_dump(), rb_vm_barrier(), rb_vm_each_stack_value(), and rb_vm_mark().

## ◆ special_exceptions

const VALUE rb_vm_struct::special_exceptions[ruby_special_error_count]

Definition at line 612 of file vm_core.h.

Referenced by rb_notify_fd_close(), rb_threadptr_execute_interrupts(), and rb_vm_register_special_exception_str().

## ◆ src_encoding_index

int rb_vm_struct::src_encoding_index

Definition at line 637 of file vm_core.h.

## ◆

struct { ... } rb_vm_struct::sync

Referenced by Init_BareVM(), rb_ractor_terminate_all(), rb_vm_barrier(), rb_vm_lock_body(), and rb_vm_unlock_body().

## ◆ terminate_cond

rb_nativethread_cond_t rb_vm_struct::terminate_cond

Definition at line 587 of file vm_core.h.

Referenced by Init_BareVM(), and rb_ractor_terminate_all().

## ◆ terminate_waiting

bool rb_vm_struct::terminate_waiting

Definition at line 588 of file vm_core.h.

Referenced by rb_ractor_terminate_all().

## ◆ thread_abort_on_exception

unsigned int rb_vm_struct::thread_abort_on_exception

Definition at line 606 of file vm_core.h.

## ◆ thread_ignore_deadlock

unsigned int rb_vm_struct::thread_ignore_deadlock

Definition at line 608 of file vm_core.h.

## ◆ thread_machine_stack_size

size_t rb_vm_struct::thread_machine_stack_size

Definition at line 673 of file vm_core.h.

## ◆ thread_report_on_exception

unsigned int rb_vm_struct::thread_report_on_exception

Definition at line 607 of file vm_core.h.

## ◆ thread_vm_stack_size

size_t rb_vm_struct::thread_vm_stack_size

Definition at line 672 of file vm_core.h.

## ◆ top_self

VALUE rb_vm_struct::top_self

Definition at line 615 of file vm_core.h.

Referenced by Init_top_self(), rb_vm_mark(), and rb_vm_update_references().

## ◆

struct { ... } rb_vm_struct::trap_list

Referenced by rb_signal_exec(), rb_vm_mark(), and rb_vm_trap_exit().

## ◆ ubf_async_safe

volatile int rb_vm_struct::ubf_async_safe

Definition at line 603 of file vm_core.h.

Referenced by rb_nogvl().

## ◆ waiting_fds

struct list_head rb_vm_struct::waiting_fds

Definition at line 600 of file vm_core.h.

Referenced by rb_notify_fd_close(), and rb_thread_wait_for_single_fd().

## ◆ waiting_grps

struct list_head rb_vm_struct::waiting_grps

Definition at line 599 of file vm_core.h.

Referenced by ruby_waitpid_all(), and ruby_waitpid_locked().

## ◆ waiting_pids

struct list_head rb_vm_struct::waiting_pids

Definition at line 598 of file vm_core.h.

Referenced by ruby_waitpid_all(), and ruby_waitpid_locked().

## ◆ waitpid_lock

rb_nativethread_lock_t rb_vm_struct::waitpid_lock

Definition at line 597 of file vm_core.h.

Referenced by Init_Thread_Mutex(), rb_grantpt(), rb_sigwait_fd_migrate(), ruby_vm_destruct(), ruby_waitpid_all(), and ruby_waitpid_locked().

## ◆ workqueue

struct list_head rb_vm_struct::workqueue

Definition at line 640 of file vm_core.h.

Referenced by rb_postponed_job_flush(), and rb_workqueue_register().

## ◆ workqueue_lock

rb_nativethread_lock_t rb_vm_struct::workqueue_lock

Definition at line 641 of file vm_core.h.

Referenced by Init_Thread_Mutex(), rb_postponed_job_flush(), rb_workqueue_register(), and ruby_vm_destruct().

The documentation for this struct was generated from the following file:

- vm_core.h