Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)
|
Internal header for Thread. More...
Go to the source code of this file.
Macros | |
#define | COVERAGE_INDEX_LINES 0 |
#define | COVERAGE_INDEX_BRANCHES 1 |
#define | COVERAGE_TARGET_LINES 1 |
#define | COVERAGE_TARGET_BRANCHES 2 |
#define | COVERAGE_TARGET_METHODS 4 |
#define | COVERAGE_TARGET_ONESHOT_LINES 8 |
Functions | |
VALUE | rb_obj_is_mutex (VALUE obj) |
VALUE | rb_suppress_tracing (VALUE(*func)(VALUE), VALUE arg) |
void | rb_thread_execute_interrupts (VALUE th) |
VALUE | rb_get_coverages (void) |
int | rb_get_coverage_mode (void) |
VALUE | rb_default_coverage (int) |
VALUE | rb_thread_shield_new (void) |
VALUE | rb_thread_shield_wait (VALUE self) |
VALUE | rb_thread_shield_release (VALUE self) |
VALUE | rb_thread_shield_destroy (VALUE self) |
int | rb_thread_to_be_killed (VALUE thread) |
void | rb_mutex_allow_trap (VALUE self, int val) |
VALUE | rb_uninterruptible (VALUE(*b_proc)(VALUE), VALUE data) |
VALUE | rb_mutex_owned_p (VALUE self) |
int | rb_thread_wait_for_single_fd (int fd, int events, struct timeval *timeout) |
VALUE | rb_thread_io_blocking_region (rb_blocking_function_t *func, void *data1, int fd) |
int | ruby_thread_has_gvl_p (void) |
int | rb_threadptr_execute_interrupts (struct rb_thread_struct *th, int blocking_timing) |
Internal header for Thread.
Definition in file thread.h.
Definition at line 5815 of file thread.c.
References COVERAGE_INDEX_BRANCHES, COVERAGE_INDEX_LINES, COVERAGE_TARGET_BRANCHES, COVERAGE_TARGET_LINES, Qfalse, rb_ary_tmp_new(), rb_ary_tmp_new_fill(), rb_hash_new(), and rb_obj_hide().
Referenced by rb_iseq_new_top().
int rb_get_coverage_mode | ( | void | ) |
Definition at line 5779 of file thread.c.
Referenced by rb_iseq_new_top().
VALUE rb_get_coverages | ( | void | ) |
Definition at line 5773 of file thread.c.
Referenced by rb_iseq_new_top().
Definition at line 621 of file thread_sync.c.
References Check_TypedStruct, FL_SET_RAW, FL_UNSET_RAW, and MUTEX_ALLOW_TRAP.
Definition at line 414 of file thread_sync.c.
References sync_waiter::fiber, and sync_waiter::self.
Definition at line 142 of file thread_sync.c.
References Qfalse, Qtrue, and rb_typeddata_is_kind_of().
Referenced by rb_objspace_call_finalizer().
Definition at line 418 of file vm_trace.c.
References EC_EXEC_TAG, EC_JUMP_TAG, EC_POP_TAG, EC_PUSH_TAG, rb_trace_arg_struct::event, LIKELY, NULL, Qnil, rb_ec_reset_raised(), RB_GC_GUARD, TAG_NONE, and rb_execution_context_struct::trace_arg.
void rb_thread_execute_interrupts | ( | VALUE | th | ) |
Definition at line 2525 of file thread.c.
References rb_threadptr_execute_interrupts().
Referenced by rb_f_kill().
VALUE rb_thread_io_blocking_region | ( | rb_blocking_function_t * | func, |
void * | data1, | ||
int | fd | ||
) |
Definition at line 1815 of file thread.c.
References BLOCKING_REGION, COROUTINE_STACK_FREE, COROUTINE_STACK_LOCAL, EC_EXEC_TAG, EC_JUMP_TAG, EC_POP_TAG, EC_PUSH_TAG, FALSE, Qundef, RB_VM_LOCK_ENTER, RB_VM_LOCK_LEAVE, RUBY_VM_CHECK_INTS_BLOCKING, and TAG_NONE.
VALUE rb_thread_shield_new | ( | void | ) |
Definition at line 5072 of file thread.c.
References DATA_PTR, and rb_mutex_lock().
Definition at line 5117 of file thread.c.
References Qfalse, Qtrue, and rb_mutex_unlock().
Definition at line 5088 of file thread.c.
References DATA_PTR, rb_mutex_struct::fiber, GetThreadShieldPtr, Qfalse, Qnil, Qtrue, rb_mutex_lock(), and rb_mutex_unlock().
Definition at line 2720 of file thread.c.
References FALSE, THREAD_KILLED, rb_thread_struct::to_kill, and TRUE.
Definition at line 4551 of file thread.c.
References select_args::as, select_args::error, select_args::except, waiting_fd::fd, select_args::fd, int(), NULL, ptr, rb_ensure(), RB_VM_LOCK_ENTER, RB_VM_LOCK_LEAVE, RB_WAITFD_IN, RB_WAITFD_OUT, RB_WAITFD_PRI, select_args::read, waiting_fd::th, select_args::timeout, select_args::tv, rb_thread_struct::vm, rb_vm_struct::waiting_fds, select_args::wfd, waiting_fd::wfd_node, and select_args::write.
Referenced by rb_io_wait(), and rb_wait_for_single_fd().
int rb_threadptr_execute_interrupts | ( | struct rb_thread_struct * | th, |
int | blocking_timing | ||
) |
Definition at line 2424 of file thread.c.
References rb_execution_context_struct::cfp, rb_thread_struct::ec, eKillSignal, err, eTerminateSignal, EXEC_EVENT_HOOK, FALSE, INT2FIX, INTERRUPT_NONE, INTERRUPT_ON_BLOCKING, rb_vm_struct::main_thread, PENDING_INTERRUPT_MASK, POSTPONED_JOB_INTERRUPT_MASK, rb_blocking_region_buffer::prev_status, PRIdVALUE, rb_thread_struct::priority, Qundef, rb_vm_struct::ractor, rb_execution_context_struct::raised_flag, rb_exc_raise(), rb_get_next_signal(), rb_postponed_job_flush(), rb_signal_exec(), rb_sigwait_fd_get(), rb_sigwait_fd_migrate(), rb_sigwait_fd_put(), RB_VM_LOCK_ENTER, RB_VM_LOCK_LEAVE, ruby_error_stream_closed, RUBY_INTERNAL_EVENT_SWITCH, ruby_sigchld_handler(), ruby_vm_special_exception_copy(), rb_thread_struct::running_time_us, rb_control_frame_struct::self, rb_vm_struct::special_exceptions, TAG_FATAL, TERMINATE_INTERRUPT_MASK, thread_debug, THREAD_RUNNABLE, THREAD_STOPPED, THREAD_STOPPED_FOREVER, TIMER_INTERRUPT_MASK, TRAP_INTERRUPT_MASK, TRUE, rb_thread_struct::vm, VM_ASSERT, and VM_BARRIER_INTERRUPT_MASK.
Definition at line 5874 of file thread.c.
References rb_thread_struct::ec, OBJ_FREEZE_RAW, rb_thread_struct::pending_interrupt_mask_stack, Qnil, rb_ary_push(), rb_cObject, rb_ensure(), rb_hash_aset(), rb_ident_hash_new(), and RUBY_VM_CHECK_INTS.