Ruby 1.9.2p136(2010-12-25revision30365)

- Main Page
- Modules
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Data Fields

Data Fields

# rb_thread_struct Struct Reference

`#include <vm_core.h>`

## Data Fields
VALUE | self
rb_vm_t * | vm
VALUE * | stack
unsigned long | stack_size
rb_control_frame_t * | cfp
int | safe_level
int | raised_flag
VALUE | last_status
int | state
const rb_block_t * | passed_block
const rb_method_entry_t * | passed_me
VALUE | top_self
VALUE | top_wrapper
rb_block_t * | base_block
VALUE * | local_lfp
VALUE | local_svar
rb_thread_id_t | thread_id
enum rb_thread_status | status
int | priority
int | slice
native_thread_data_t | native_thread_data
void * | blocking_region_buffer
VALUE | thgroup
VALUE | value
VALUE | errinfo
VALUE | thrown_errinfo
int | exec_signal
int | interrupt_flag
rb_thread_lock_t | interrupt_lock
struct rb_unblock_callback | unblock
VALUE | locking_mutex
struct rb_mutex_struct * | keeping_mutexes
int | transition_for_lock
struct rb_vm_tag * | tag
struct rb_vm_protect_tag * | protect_tag
int | parse_in_eval
int | mild_compile_error
st_table * | local_storage
struct rb_thread_struct * | join_list_next
struct rb_thread_struct * | join_list_head
VALUE | first_proc
VALUE | first_args
VALUE(* | first_func )(ANYARGS)
VALUE * | machine_stack_start
VALUE * | machine_stack_end
size_t | machine_stack_maxsize
jmp_buf | machine_regs
int | mark_stack_len
VALUE | stat_insn_usage
rb_event_hook_t * | event_hooks
rb_event_flag_t | event_flags
int | tracing
VALUE | fiber
VALUE | root_fiber
rb_jmpbuf_t | root_jmpbuf
int | method_missing_reason
int | abort_on_exception

## Detailed Description

Definition at line 377 of file vm_core.h.

## Field Documentation

int rb_thread_struct::abort_on_exception

Definition at line 479 of file vm_core.h.

Referenced by rb_thread_abort_exc(), and rb_thread_abort_exc_set().

rb_block_t* rb_thread_struct::base_block

Definition at line 404 of file vm_core.h.

Referenced by eval_string_with_cref(), rb_dvar_defined(), rb_iseq_compile_with_option(), rb_iseq_new_main(), rb_local_defined(), require_libraries(), ruby_exec_internal(), vm_set_eval_stack(), and vm_set_main_stack().

void* rb_thread_struct::blocking_region_buffer

Definition at line 416 of file vm_core.h.

Referenced by rb_thread_call_with_gvl(), and ruby_thread_has_gvl_p().

rb_control_frame_t* rb_thread_struct::cfp

Definition at line 385 of file vm_core.h.

Referenced by check_block(), cont_capture(), cont_restore_1(), errinfo_place(), eval_string_with_cref(), fiber_init(), Init_VM(), invoke_block_from_c(), m_core_set_postexe(), proc_new(), raise_method_missing(), rb_add_method(), rb_binding_new(), rb_block_given_p(), rb_catch_obj(), rb_current_realfilepath(), rb_f_block_given_p(), rb_f_local_variables(), rb_frame_caller(), rb_frame_pop(), rb_iterate(), rb_method_call_status(), rb_protect(), rb_raise_jump(), rb_rescue2(), rb_sourcefile(), rb_sourceline(), rb_thread_current_status(), rb_thread_mark(), rb_thread_method_id_and_class(), rb_threadptr_execute_interrupts_rec(), rb_vm_call_cfunc(), rb_vm_cbase(), rb_vm_cref(), rb_vm_set_finish_env(), rb_vm_stack_to_heap(), rb_vmdebug_debug_print_post(), rb_vmdebug_debug_print_register(), rb_vmdebug_stack_dump_raw_current(), rb_vmdebug_stack_dump_th(), rb_vmdebug_thread_dump_state(), setup_exception(), th_init2(), vm_backtrace_each(), vm_call0(), vm_call_cfunc(), vm_call_super(), vm_cref_push(), vm_exec(), vm_exec_core(), vm_get_ev_const(), vm_iter_break(), vm_method_missing_args(), vm_pop_frame(), vm_push_frame(), vm_set_eval_stack(), vm_set_main_stack(), vm_set_top_stack(), vm_setup_method(), vm_svar_get(), vm_svar_set(), vm_yield_setup_block_args(), vm_yield_with_cfunc(), and yield_under().

VALUE rb_thread_struct::errinfo

Definition at line 421 of file vm_core.h.

Referenced by cont_restore_1(), err_append(), error_print(), eval_string_with_cref(), get_thread_errinfo(), rb_catch_obj(), rb_errinfo(), rb_fiber_start(), rb_iterate(), rb_load_internal(), rb_require_safe(), rb_rescue2(), rb_thread_mark(), rb_thread_status(), rb_threadptr_exec_event_hooks(), rb_threadptr_execute_interrupts_rec(), rb_throw_obj(), ruby_cleanup(), ruby_thread_stack_overflow(), setup_exception(), th_init2(), thread_join(), vm_exec(), and vm_iter_break().

rb_event_flag_t rb_thread_struct::event_flags

Definition at line 469 of file vm_core.h.

Referenced by rb_threadptr_exec_event_hooks(), set_threads_event_flags_i(), thread_create_core(), and thread_reset_event_flags().

rb_event_hook_t* rb_thread_struct::event_hooks

Definition at line 468 of file vm_core.h.

Referenced by rb_thread_mark(), rb_threadptr_add_event_hook(), rb_threadptr_exec_event_hooks(), rb_threadptr_revmove_event_hook(), and thread_reset_event_flags().

int rb_thread_struct::exec_signal

Definition at line 423 of file vm_core.h.

Referenced by rb_threadptr_check_signal(), and rb_threadptr_execute_interrupts_rec().

VALUE rb_thread_struct::fiber

Definition at line 473 of file vm_core.h.

Referenced by cont_restore_1(), fiber_store(), fiber_switch(), rb_cont_call(), rb_fiber_current(), rb_fiber_start(), and rb_thread_mark().

VALUE rb_thread_struct::first_args

Definition at line 449 of file vm_core.h.

Referenced by rb_thread_mark(), thread_create_core(), thread_initialize(), thread_s_new(), and thread_start_func_2().

VALUE(* rb_thread_struct::first_func)(ANYARGS)

Definition at line 450 of file vm_core.h.

Referenced by thread_create_core().

VALUE rb_thread_struct::first_proc

Definition at line 448 of file vm_core.h.

Referenced by cont_restore_1(), fiber_init(), rb_fiber_start(), rb_thread_mark(), thread_create_core(), and thread_initialize().

int rb_thread_struct::interrupt_flag

Definition at line 425 of file vm_core.h.

Referenced by rb_threadptr_execute_interrupts_rec(), and set_unblock_function().

rb_thread_lock_t rb_thread_struct::interrupt_lock

Definition at line 426 of file vm_core.h.

Referenced by rb_threadptr_interrupt(), reset_unblock_function(), set_unblock_function(), and thread_create_core().

struct rb_thread_struct* rb_thread_struct::join_list_head

Definition at line 446 of file vm_core.h.

Referenced by remove_from_join_list(), thread_join(), and thread_start_func_2().

struct rb_thread_struct* rb_thread_struct::join_list_next

Definition at line 445 of file vm_core.h.

Referenced by remove_from_join_list(), thread_join(), and thread_start_func_2().

struct rb_mutex_struct* rb_thread_struct::keeping_mutexes

Definition at line 429 of file vm_core.h.

Referenced by mutex_locked(), mutex_unlock(), rb_thread_terminate_all(), terminate_atfork_i(), thread_free(), and thread_unlock_all_locking_mutexes().

VALUE rb_thread_struct::last_status

Definition at line 388 of file vm_core.h.

Referenced by rb_last_status_set(), rb_thread_mark(), and th_init2().

VALUE* rb_thread_struct::local_lfp

Definition at line 406 of file vm_core.h.

Referenced by lfp_svar_place(), and rb_fiber_start().

st_table* rb_thread_struct::local_storage

Definition at line 439 of file vm_core.h.

Referenced by cont_init(), cont_restore_1(), fiber_free(), fiber_init(), fiber_memsize(), rb_thread_key_p(), rb_thread_keys(), rb_thread_local_aref(), rb_thread_local_aset(), rb_thread_mark(), thread_free(), and thread_memsize().

VALUE rb_thread_struct::local_svar

Definition at line 407 of file vm_core.h.

Referenced by lfp_svar_place(), rb_fiber_start(), and rb_thread_mark().

VALUE rb_thread_struct::locking_mutex

Definition at line 428 of file vm_core.h.

Referenced by check_deadlock_i(), rb_mutex_lock(), rb_thread_mark(), thread_cleanup_func(), and thread_free().

jmp_buf rb_thread_struct::machine_regs

Definition at line 461 of file vm_core.h.

Referenced by rb_gc_save_machine_context(), and rb_thread_mark().

VALUE* rb_thread_struct::machine_stack_end

Definition at line 454 of file vm_core.h.

Referenced by cont_save_machine_stack(), rb_thread_mark(), and thread_cleanup_func_before_exec().

size_t rb_thread_struct::machine_stack_maxsize

Definition at line 455 of file vm_core.h.

VALUE* rb_thread_struct::machine_stack_start

Definition at line 453 of file vm_core.h.

Referenced by cont_save_machine_stack(), rb_thread_mark(), thread_cleanup_func_before_exec(), and thread_start_func_2().

int rb_thread_struct::mark_stack_len

Definition at line 462 of file vm_core.h.

Referenced by cont_capture(), rb_thread_mark(), vm_callee_setup_arg_complex(), and vm_yield_setup_block_args().

int rb_thread_struct::method_missing_reason

Definition at line 478 of file vm_core.h.

Referenced by check_funcall(), method_missing(), rb_method_missing(), and vm_method_missing_args().

int rb_thread_struct::mild_compile_error

Definition at line 436 of file vm_core.h.

Referenced by err_append(), eval_string_with_cref(), and rb_load_internal().

native_thread_data_t rb_thread_struct::native_thread_data

Definition at line 415 of file vm_core.h.

int rb_thread_struct::parse_in_eval

Definition at line 435 of file vm_core.h.

Referenced by eval_string_with_cref(), and require_libraries().

const rb_block_t* rb_thread_struct::passed_block

Definition at line 394 of file vm_core.h.

Referenced by invoke_block_from_c(), method_missing(), rb_iterate(), rb_raise_method_missing(), vm_call0(), and vm_method_missing_args().

const rb_method_entry_t* rb_thread_struct::passed_me

Definition at line 397 of file vm_core.h.

Referenced by invoke_block_from_c(), and vm_call_bmethod().

int rb_thread_struct::priority

Definition at line 412 of file vm_core.h.

Referenced by rb_thread_priority(), rb_thread_priority_set(), rb_threadptr_execute_interrupts_rec(), and thread_create_core().

struct rb_vm_protect_tag* rb_thread_struct::protect_tag

Definition at line 433 of file vm_core.h.

Referenced by cont_restore_1(), fiber_switch(), rb_cont_call(), and rb_protect().

int rb_thread_struct::raised_flag

Definition at line 387 of file vm_core.h.

Referenced by cont_restore_1(), error_print(), rb_threadptr_execute_interrupts_rec(), rb_threadptr_raise(), rb_threadptr_reset_raised(), rb_threadptr_set_raised(), and ruby_thread_stack_overflow().

VALUE rb_thread_struct::root_fiber

Definition at line 474 of file vm_core.h.

Referenced by cont_restore_1(), fiber_store(), fiber_switch(), rb_fiber_current(), rb_thread_mark(), return_fiber(), thread_free(), and thread_memsize().

rb_jmpbuf_t rb_thread_struct::root_jmpbuf

Definition at line 475 of file vm_core.h.

Referenced by fiber_init().

int rb_thread_struct::safe_level

Definition at line 386 of file vm_core.h.

Referenced by cont_restore_1(), rb_method_call_status(), rb_set_safe_level(), rb_thread_kill(), rb_thread_safe_level(), rb_vm_invoke_proc(), rb_vm_make_proc(), ruby_cleanup(), safe_setter(), and vm_call_method().

VALUE rb_thread_struct::self

Definition at line 379 of file vm_core.h.

Referenced by fiber_switch(), Init_VM(), rb_cont_call(), rb_thread_atfork_internal(), th_init2(), thread_create_core(), thread_join(), and thread_list_i().

int rb_thread_struct::slice

Definition at line 413 of file vm_core.h.

Referenced by rb_thread_priority_set(), and rb_threadptr_execute_interrupts_rec().

VALUE* rb_thread_struct::stack

Definition at line 383 of file vm_core.h.

Referenced by cont_capture(), cont_free(), cont_restore_1(), control_frame_dump(), fiber_init(), rb_frame_caller(), rb_thread_mark(), rb_vm_make_proc(), rb_vm_set_progname(), rb_vmdebug_debug_print_register(), rb_vmdebug_stack_dump_raw(), th_init2(), thread_free(), vm_backtrace_each(), and vm_make_env_each().

unsigned long rb_thread_struct::stack_size

Definition at line 384 of file vm_core.h.

Referenced by cont_capture(), cont_mark(), cont_memsize(), cont_restore_1(), control_frame_dump(), fiber_init(), rb_frame_caller(), rb_thread_mark(), rb_vm_make_proc(), rb_vm_set_progname(), rb_vmdebug_debug_print_register(), rb_vmdebug_stack_dump_raw(), th_init2(), thread_memsize(), vm_backtrace_each(), and vm_throw().

VALUE rb_thread_struct::stat_insn_usage

Definition at line 465 of file vm_core.h.

Referenced by rb_thread_mark().

int rb_thread_struct::state

Definition at line 391 of file vm_core.h.

Referenced by cont_restore_1(), rb_iterate(), ruby_suppress_tracing(), vm_exec(), vm_iter_break(), and vm_throw().

enum rb_thread_status rb_thread_struct::status

Definition at line 411 of file vm_core.h.

Referenced by check_deadlock_i(), cont_restore_1(), rb_mutex_lock(), rb_thread_backtrace(), rb_thread_inspect(), rb_thread_kill(), rb_thread_status(), rb_thread_stop_p(), rb_thread_wakeup(), rb_threadptr_check_signal(), rb_threadptr_dead(), rb_threadptr_execute_interrupts_rec(), remove_from_join_list(), sleep_forever(), sleep_timeval(), th_init2(), thread_cleanup_func_before_exec(), thread_create_core(), thread_join(), thread_join_sleep(), thread_list_i(), and thread_start_func_2().

struct rb_vm_tag* rb_thread_struct::tag

Definition at line 432 of file vm_core.h.

Referenced by cont_restore_1(), fiber_init(), rb_catch_obj(), and rb_throw_obj().

VALUE rb_thread_struct::thgroup

Definition at line 418 of file vm_core.h.

Referenced by Init_Thread(), rb_thread_group(), rb_thread_mark(), thgroup_add(), thgroup_list_i(), and thread_create_core().

rb_thread_id_t rb_thread_struct::thread_id

Definition at line 410 of file vm_core.h.

Referenced by Init_VM(), rb_thread_kill(), thread_create_core(), thread_join(), and thread_join_sleep().

VALUE rb_thread_struct::thrown_errinfo

Definition at line 422 of file vm_core.h.

Referenced by rb_fiber_start(), rb_thread_mark(), rb_threadptr_execute_interrupts_rec(), and rb_threadptr_raise().

VALUE rb_thread_struct::top_self

Definition at line 400 of file vm_core.h.

Referenced by Init_VM(), rb_eval_string_wrap(), rb_load_internal(), rb_thread_mark(), ruby_thread_init(), and vm_set_top_stack().

VALUE rb_thread_struct::top_wrapper

Definition at line 401 of file vm_core.h.

Referenced by Init_VM(), rb_eval_string_wrap(), rb_load_internal(), rb_set_end_proc(), rb_thread_mark(), ruby_thread_init(), set_relation(), and top_include().

int rb_thread_struct::tracing

Definition at line 470 of file vm_core.h.

Referenced by ruby_suppress_tracing().

int rb_thread_struct::transition_for_lock

Definition at line 430 of file vm_core.h.

Referenced by check_deadlock_i(), lock_func(), and rb_mutex_lock().

struct rb_unblock_callback rb_thread_struct::unblock

Definition at line 427 of file vm_core.h.

Referenced by rb_thread_call_with_gvl(), rb_threadptr_interrupt(), reset_unblock_function(), and set_unblock_function().

VALUE rb_thread_struct::value

Definition at line 419 of file vm_core.h.

Referenced by rb_thread_mark(), and thread_value().

rb_vm_t* rb_thread_struct::vm

Definition at line 380 of file vm_core.h.

Referenced by blocking_region_end(), garbage_collect(), Init_BareVM(), Init_Thread(), Init_VM(), rb_mutex_lock(), rb_newobj(), rb_thread_atfork_internal(), rb_thread_kill(), rb_thread_schedule_rec(), rb_thread_terminate_all(), rb_threadptr_exec_event_hooks(), rb_threadptr_signal_exit(), rb_threadptr_signal_raise(), ruby_thread_init(), sleep_forever(), thread_create_core(), thread_free(), thread_start_func_2(), and vm_backtrace_each().

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

- vm_core.h