#include "gc.h"Go to the source code of this file.
Data Structures | |
| struct | cached_thread_entry |
Defines | |
| #define | RB_CONDATTR_CLOCK_MONOTONIC 1 |
| #define | USE_MONOTONIC_COND 0 |
| #define | USE_SLEEPY_TIMER_THREAD 0 |
| #define | NATIVE_MUTEX_LOCK_DEBUG 0 |
| #define | native_cleanup_push pthread_cleanup_push |
| #define | native_cleanup_pop pthread_cleanup_pop |
| #define | native_thread_yield() ((void)0) |
| #define | USE_THREAD_CACHE 0 |
| #define | MAINSTACKADDR_AVAILABLE 0 |
| #define | reserve_stack(limit, size) ((void)(limit), (void)(size)) |
| #define | CHECK_ERR(expr) {int err = (expr); if (err) {rb_bug_errno(#expr, err);}} |
| #define | USE_NATIVE_THREAD_INIT 1 |
| #define | add_signal_thread_list(th) (void)(th) |
| #define | remove_signal_thread_list(th) (void)(th) |
| #define | ubf_select 0 |
| #define | TT_DEBUG 0 |
| #define | WRITE_CONST(fd, str) (void)(write((fd),(str),sizeof(str)-1)<0) |
| #define | TIME_QUANTUM_USEC (100 * 1000) |
| #define | PER_NANO 1000000000 |
| #define | SET_THREAD_NAME(name) (void)0 |
Enumerations | |
| enum | { RUBY_STACK_SPACE_LIMIT = 1024 * 1024, RUBY_STACK_SPACE_RATIO = 5 } |
Functions | |
| static void | native_mutex_lock (pthread_mutex_t *lock) |
| static void | native_mutex_unlock (pthread_mutex_t *lock) |
| static int | native_mutex_trylock (pthread_mutex_t *lock) |
| static void | native_mutex_initialize (pthread_mutex_t *lock) |
| static void | native_mutex_destroy (pthread_mutex_t *lock) |
| static void | native_cond_signal (rb_nativethread_cond_t *cond) |
| static void | native_cond_broadcast (rb_nativethread_cond_t *cond) |
| static void | native_cond_wait (rb_nativethread_cond_t *cond, pthread_mutex_t *mutex) |
| static void | native_cond_initialize (rb_nativethread_cond_t *cond, int flags) |
| static void | native_cond_destroy (rb_nativethread_cond_t *cond) |
| static void | rb_thread_wakeup_timer_thread_low (void) |
| static void | gvl_acquire_common (rb_vm_t *vm) |
| static void | gvl_acquire (rb_vm_t *vm, rb_thread_t *th) |
| static void | gvl_release_common (rb_vm_t *vm) |
| static void | gvl_release (rb_vm_t *vm) |
| static void | gvl_yield (rb_vm_t *vm, rb_thread_t *th) |
| static void | gvl_init (rb_vm_t *vm) |
| static void | gvl_destroy (rb_vm_t *vm) |
| static void | gvl_atfork (rb_vm_t *vm) |
| static void | mutex_debug (const char *msg, pthread_mutex_t *lock) |
| static int | native_cond_timedwait (rb_nativethread_cond_t *cond, pthread_mutex_t *mutex, struct timespec *ts) |
| static struct timespec | native_cond_timeout (rb_nativethread_cond_t *cond, struct timespec timeout_rel) |
| static void | null_func (int i) |
| static rb_thread_t * | ruby_thread_from_native (void) |
| static int | ruby_thread_set_native (rb_thread_t *th) |
| static void | native_thread_init (rb_thread_t *th) |
| void | Init_native_thread (void) |
| static void | native_thread_destroy (rb_thread_t *th) |
| static size_t | space_size (size_t stack_size) |
| void | ruby_init_stack (volatile VALUE *addr) |
| static int | native_thread_init_stack (rb_thread_t *th) |
| static void * | thread_start_func_1 (void *th_ptr) |
| static int | use_cached_thread (rb_thread_t *th) |
| static int | native_thread_create (rb_thread_t *th) |
| static void | native_thread_join (pthread_t th) |
| static int | native_fd_select (int n, rb_fdset_t *readfds, rb_fdset_t *writefds, rb_fdset_t *exceptfds, struct timeval *timeout, rb_thread_t *th) |
| static void | ubf_pthread_cond_signal (void *ptr) |
| static void | native_sleep (rb_thread_t *th, struct timeval *timeout_tv) |
| static void | ping_signal_thread_list (void) |
| static int | check_signal_thread_list (void) |
| void | rb_thread_wakeup_timer_thread (void) |
| static void | timer_thread_sleep (rb_global_vm_lock_t *unused) |
| static void * | thread_timer (void *p) |
| static void | rb_thread_create_timer_thread (void) |
| static int | native_stop_timer_thread (int close_anyway) |
| static void | native_reset_timer_thread (void) |
| int | rb_reserved_fd_p (int fd) |
| rb_nativethread_id_t | rb_nativethread_self (void) |
Variables | |
| static pthread_t | timer_thread_id |
| static pthread_key_t | ruby_native_thread_key |
| struct { | |
| rb_nativethread_id_t id | |
| size_t stack_maxsize | |
| VALUE * stack_start | |
| } | native_main_thread |
| static pthread_mutex_t | timer_thread_lock |
| static rb_nativethread_cond_t | timer_thread_cond |
| #define add_signal_thread_list | ( | th | ) | (void)(th) |
Definition at line 1265 of file thread_pthread.c.
Definition at line 803 of file thread_pthread.c.
Referenced by native_thread_create(), and native_thread_init_stack().
| #define MAINSTACKADDR_AVAILABLE 0 |
Definition at line 546 of file thread_pthread.c.
| #define native_cleanup_pop pthread_cleanup_pop |
Definition at line 408 of file thread_pthread.c.
| #define native_cleanup_push pthread_cleanup_push |
Definition at line 407 of file thread_pthread.c.
| #define NATIVE_MUTEX_LOCK_DEBUG 0 |
Definition at line 184 of file thread_pthread.c.
Referenced by mutex_debug().
| #define native_thread_yield | ( | ) | ((void)0) |
Definition at line 412 of file thread_pthread.c.
Referenced by gvl_yield().
| #define PER_NANO 1000000000 |
Definition at line 1465 of file thread_pthread.c.
| #define RB_CONDATTR_CLOCK_MONOTONIC 1 |
Definition at line 50 of file thread_pthread.c.
Referenced by gvl_init(), Init_Thread(), mutex_alloc(), native_cond_initialize(), native_thread_init(), thread_create_core(), and thread_timer().
| #define remove_signal_thread_list | ( | th | ) | (void)(th) |
Definition at line 1266 of file thread_pthread.c.
Referenced by blocking_region_end().
Definition at line 707 of file thread_pthread.c.
Referenced by ruby_init_stack().
| #define SET_THREAD_NAME | ( | name | ) | (void)0 |
Definition at line 1488 of file thread_pthread.c.
Referenced by thread_timer().
| #define TIME_QUANTUM_USEC (100 * 1000) |
Definition at line 1278 of file thread_pthread.c.
Referenced by rb_threadptr_execute_interrupts(), timer_thread_func(), and timer_thread_sleep().
| #define TT_DEBUG 0 |
Definition at line 1272 of file thread_pthread.c.
Referenced by native_reset_timer_thread(), native_stop_timer_thread(), and thread_timer().
| #define ubf_select 0 |
Definition at line 1267 of file thread_pthread.c.
Referenced by call_without_gvl(), do_select(), rb_thread_blocking_region_begin(), and rb_thread_io_blocking_region().
| #define USE_MONOTONIC_COND 0 |
Definition at line 57 of file thread_pthread.c.
| #define USE_NATIVE_THREAD_INIT 1 |
Definition at line 842 of file thread_pthread.c.
| #define USE_SLEEPY_TIMER_THREAD 0 |
Definition at line 64 of file thread_pthread.c.
| #define USE_THREAD_CACHE 0 |
Definition at line 476 of file thread_pthread.c.
| #define WRITE_CONST | ( | fd, | |||
| str | ) | (void)(write((fd),(str),sizeof(str)-1)<0) |
Definition at line 1273 of file thread_pthread.c.
| anonymous enum |
Definition at line 637 of file thread_pthread.c.
| static int check_signal_thread_list | ( | void | ) | [static] |
Definition at line 1269 of file thread_pthread.c.
| static void gvl_acquire | ( | rb_vm_t * | vm, | |
| rb_thread_t * | th | |||
| ) | [static] |
Definition at line 98 of file thread_pthread.c.
References rb_vm_struct::gvl, gvl_acquire_common(), rb_global_vm_lock_struct::lock, native_mutex_lock(), and native_mutex_unlock().
Referenced by blocking_region_end(), gvl_atfork(), Init_Thread(), and thread_start_func_2().
| static void gvl_acquire_common | ( | rb_vm_t * | vm | ) | [static] |
Definition at line 68 of file thread_pthread.c.
References rb_global_vm_lock_struct::acquired, rb_global_vm_lock_struct::cond, rb_vm_struct::gvl, rb_global_vm_lock_struct::lock, native_cond_signal(), native_cond_wait(), rb_global_vm_lock_struct::need_yield, rb_thread_wakeup_timer_thread_low(), rb_global_vm_lock_struct::switch_cond, and rb_global_vm_lock_struct::waiting.
Referenced by gvl_acquire(), and gvl_yield().
| static void gvl_atfork | ( | rb_vm_t * | vm | ) | [static] |
Definition at line 178 of file thread_pthread.c.
References GET_THREAD(), gvl_acquire(), and gvl_init().
Referenced by rb_thread_atfork_internal().
| static void gvl_destroy | ( | rb_vm_t * | vm | ) | [static] |
Definition at line 169 of file thread_pthread.c.
References rb_global_vm_lock_struct::cond, rb_vm_struct::gvl, rb_global_vm_lock_struct::lock, native_cond_destroy(), native_mutex_destroy(), rb_global_vm_lock_struct::switch_cond, and rb_global_vm_lock_struct::switch_wait_cond.
Referenced by rb_vm_gvl_destroy().
| static void gvl_init | ( | rb_vm_t * | vm | ) | [static] |
Definition at line 156 of file thread_pthread.c.
References rb_global_vm_lock_struct::acquired, rb_global_vm_lock_struct::cond, rb_vm_struct::gvl, rb_global_vm_lock_struct::lock, native_cond_initialize(), native_mutex_initialize(), rb_global_vm_lock_struct::need_yield, RB_CONDATTR_CLOCK_MONOTONIC, rb_global_vm_lock_struct::switch_cond, rb_global_vm_lock_struct::switch_wait_cond, rb_global_vm_lock_struct::wait_yield, and rb_global_vm_lock_struct::waiting.
Referenced by gvl_atfork(), and Init_Thread().
| static void gvl_release | ( | rb_vm_t * | vm | ) | [static] |
Definition at line 114 of file thread_pthread.c.
References rb_vm_struct::gvl, gvl_release_common(), rb_global_vm_lock_struct::lock, native_mutex_lock(), and native_mutex_unlock().
Referenced by blocking_region_begin(), and rb_vm_gvl_destroy().
| static void gvl_release_common | ( | rb_vm_t * | vm | ) | [static] |
Definition at line 106 of file thread_pthread.c.
References rb_global_vm_lock_struct::acquired, rb_global_vm_lock_struct::cond, rb_vm_struct::gvl, native_cond_signal(), and rb_global_vm_lock_struct::waiting.
Referenced by gvl_release(), and gvl_yield().
| static void gvl_yield | ( | rb_vm_t * | vm, | |
| rb_thread_t * | th | |||
| ) | [static] |
Definition at line 122 of file thread_pthread.c.
References rb_vm_struct::gvl, gvl_acquire_common(), gvl_release_common(), rb_global_vm_lock_struct::lock, native_cond_broadcast(), native_cond_wait(), native_mutex_lock(), native_mutex_unlock(), rb_global_vm_lock_struct::need_yield, rb_global_vm_lock_struct::switch_cond, rb_global_vm_lock_struct::switch_wait_cond, UNLIKELY, rb_global_vm_lock_struct::wait_yield, and rb_global_vm_lock_struct::waiting.
Referenced by rb_thread_schedule_limits().
| void Init_native_thread | ( | void | ) |
Definition at line 447 of file thread_pthread.c.
References GET_THREAD(), native_mutex_initialize(), native_thread_init(), NULL, null_func(), posix_signal(), ruby_native_thread_key, and rb_thread_struct::thread_id.
Referenced by Init_BareVM().
| static void mutex_debug | ( | const char * | msg, | |
| pthread_mutex_t * | lock | |||
| ) | [static] |
Definition at line 187 of file thread_pthread.c.
References EXIT_FAILURE, and NATIVE_MUTEX_LOCK_DEBUG.
Referenced by native_mutex_destroy(), native_mutex_initialize(), native_mutex_lock(), native_mutex_trylock(), and native_mutex_unlock().
| static void native_cond_broadcast | ( | rb_nativethread_cond_t * | cond | ) | [static] |
Definition at line 320 of file thread_pthread.c.
References rb_thread_cond_struct::cond, and rb_bug_errno().
Referenced by gvl_yield(), and lock_interrupt().
| static void native_cond_destroy | ( | rb_nativethread_cond_t * | cond | ) | [static] |
Definition at line 287 of file thread_pthread.c.
References rb_thread_cond_struct::cond, and rb_bug_errno().
Referenced by gvl_destroy(), mutex_free(), native_thread_destroy(), and thread_timer().
| static void native_cond_initialize | ( | rb_nativethread_cond_t * | cond, | |
| int | flags | |||
| ) | [static] |
Definition at line 256 of file thread_pthread.c.
References CLOCK_MONOTONIC, CLOCK_REALTIME, rb_thread_cond_struct::cond, NULL, rb_bug_errno(), and RB_CONDATTR_CLOCK_MONOTONIC.
Referenced by gvl_init(), Init_Thread(), mutex_alloc(), native_thread_init(), thread_create_core(), and thread_timer().
| static void native_cond_signal | ( | rb_nativethread_cond_t * | cond | ) | [static] |
Definition at line 308 of file thread_pthread.c.
References rb_thread_cond_struct::cond, and rb_bug_errno().
Referenced by gvl_acquire_common(), gvl_release_common(), rb_mutex_unlock_th(), rb_threadptr_interrupt_common(), ubf_pthread_cond_signal(), and use_cached_thread().
| static int native_cond_timedwait | ( | rb_nativethread_cond_t * | cond, | |
| pthread_mutex_t * | mutex, | |||
| struct timespec * | ts | |||
| ) | [static] |
Definition at line 341 of file thread_pthread.c.
References rb_thread_cond_struct::cond, ETIMEDOUT, and rb_bug_errno().
Referenced by lock_func(), native_sleep(), and timer_thread_sleep().
| static struct timespec native_cond_timeout | ( | rb_nativethread_cond_t * | cond, | |
| struct timespec | timeout_rel | |||
| ) | [static, read] |
Definition at line 363 of file thread_pthread.c.
References clock_gettime(), CLOCK_MONOTONIC, CLOCK_REALTIME, cond, gettimeofday(), PRIdVALUE, rb_bug(), rb_sys_fail(), SIGNED_VALUE, timeval::tv_sec, and timeval::tv_usec.
Referenced by lock_func(), native_sleep(), and timer_thread_sleep().
| static void native_cond_wait | ( | rb_nativethread_cond_t * | cond, | |
| pthread_mutex_t * | mutex | |||
| ) | [static] |
Definition at line 332 of file thread_pthread.c.
References rb_thread_cond_struct::cond, and rb_bug_errno().
Referenced by gvl_acquire_common(), gvl_yield(), lock_func(), native_sleep(), and ruby_kill().
| static int native_fd_select | ( | int | n, | |
| rb_fdset_t * | readfds, | |||
| rb_fdset_t * | writefds, | |||
| rb_fdset_t * | exceptfds, | |||
| struct timeval * | timeout, | |||
| rb_thread_t * | th | |||
| ) | [static] |
Definition at line 1065 of file thread_pthread.c.
References rb_fd_select.
Referenced by do_select().
| static void native_mutex_destroy | ( | pthread_mutex_t * | lock | ) | [static] |
Definition at line 246 of file thread_pthread.c.
References mutex_debug(), and rb_bug_errno().
Referenced by gvl_destroy(), mutex_free(), rb_nativethread_lock_destroy(), rb_vm_gvl_destroy(), thread_cleanup_func(), and thread_timer().
| static void native_mutex_initialize | ( | pthread_mutex_t * | lock | ) | [static] |
Definition at line 236 of file thread_pthread.c.
References mutex_debug(), and rb_bug_errno().
Referenced by gvl_init(), Init_native_thread(), Init_Thread(), mutex_alloc(), rb_nativethread_lock_initialize(), thread_create_core(), and thread_timer().
| static void native_mutex_lock | ( | pthread_mutex_t * | lock | ) | [static] |
Definition at line 200 of file thread_pthread.c.
References mutex_debug(), and rb_bug_errno().
Referenced by check_deadlock_i(), gvl_acquire(), gvl_release(), gvl_yield(), lock_interrupt(), native_thread_create(), native_thread_init_stack(), rb_mutex_lock(), rb_mutex_trylock(), rb_mutex_unlock_th(), rb_nativethread_lock_lock(), rb_threadptr_interrupt_common(), reset_unblock_function(), ruby_kill(), set_unblock_function(), thread_timer(), and timer_thread_function().
| static int native_mutex_trylock | ( | pthread_mutex_t * | lock | ) | [inline, static] |
Definition at line 220 of file thread_pthread.c.
References mutex_debug(), and rb_bug_errno().
Referenced by Init_Thread().
| static void native_mutex_unlock | ( | pthread_mutex_t * | lock | ) | [static] |
Definition at line 210 of file thread_pthread.c.
References mutex_debug(), and rb_bug_errno().
Referenced by check_deadlock_i(), gvl_acquire(), gvl_release(), gvl_yield(), lock_interrupt(), native_thread_create(), native_thread_init_stack(), rb_mutex_lock(), rb_mutex_trylock(), rb_mutex_unlock_th(), rb_nativethread_lock_unlock(), rb_threadptr_interrupt_common(), reset_unblock_function(), ruby_kill(), set_unblock_function(), thread_timer(), and timer_thread_function().
| static void native_reset_timer_thread | ( | void | ) | [static] |
Definition at line 1607 of file thread_pthread.c.
References TT_DEBUG.
Referenced by rb_thread_reset_timer_thread(), and rb_thread_stop_timer_thread().
| static void native_sleep | ( | rb_thread_t * | th, | |
| struct timeval * | timeout_tv | |||
| ) | [static] |
Definition at line 1079 of file thread_pthread.c.
References rb_unblock_callback::arg, rb_unblock_callback::func, GVL_UNLOCK_BEGIN, GVL_UNLOCK_END, rb_thread_struct::interrupt_lock, native_cond_timedwait(), native_cond_timeout(), native_cond_wait(), rb_thread_struct::native_thread_data, RUBY_VM_INTERRUPTED, native_thread_data_struct::sleep_cond, thread_debug, timeval::tv_sec, timeval::tv_usec, ubf_pthread_cond_signal(), and rb_thread_struct::unblock.
Referenced by rb_thread_terminate_all(), sleep_forever(), and sleep_timeval().
| static int native_stop_timer_thread | ( | int | close_anyway | ) | [static] |
Definition at line 1578 of file thread_pthread.c.
References native_thread_join(), rb_thread_wakeup_timer_thread(), system_working, timer_thread_id, and TT_DEBUG.
Referenced by rb_thread_stop_timer_thread().
| static int native_thread_create | ( | rb_thread_t * | th | ) | [static] |
Definition at line 968 of file thread_pthread.c.
References CHECK_ERR, rb_vm_struct::default_params, err, rb_thread_struct::interrupt_lock, rb_thread_struct::machine, native_mutex_lock(), native_mutex_unlock(), NULL, space_size(), rb_thread_struct::stack_maxsize, rb_thread_struct::stack_start, thread_debug, rb_thread_struct::thread_id, rb_vm_struct::thread_machine_stack_size, thread_start_func_1(), use_cached_thread(), and rb_thread_struct::vm.
Referenced by thread_create_core().
| static void native_thread_destroy | ( | rb_thread_t * | th | ) | [static] |
Definition at line 470 of file thread_pthread.c.
References native_cond_destroy(), rb_thread_struct::native_thread_data, and native_thread_data_struct::sleep_cond.
Referenced by thread_cleanup_func().
| static void native_thread_init | ( | rb_thread_t * | th | ) | [static] |
Definition at line 463 of file thread_pthread.c.
References native_cond_initialize(), rb_thread_struct::native_thread_data, RB_CONDATTR_CLOCK_MONOTONIC, ruby_thread_set_native(), and native_thread_data_struct::sleep_cond.
Referenced by Init_native_thread(), and thread_start_func_1().
| static int native_thread_init_stack | ( | rb_thread_t * | th | ) | [static] |
Definition at line 807 of file thread_pthread.c.
References rb_thread_struct::interrupt_lock, rb_thread_struct::machine, native_main_thread, native_mutex_lock(), native_mutex_unlock(), rb_eNotImpError, rb_raise(), rb_thread_struct::stack_maxsize, and rb_thread_struct::stack_start.
Referenced by ruby_thread_init_stack(), and thread_start_func_1().
| static void native_thread_join | ( | pthread_t | th | ) | [static] |
Definition at line 1025 of file thread_pthread.c.
References err, rb_eThreadError, and rb_raise().
Referenced by native_stop_timer_thread().
| static void null_func | ( | int | i | ) | [static] |
Definition at line 427 of file thread_pthread.c.
Referenced by Init_native_thread().
| static void ping_signal_thread_list | ( | void | ) | [static] |
Definition at line 1268 of file thread_pthread.c.
Referenced by thread_timer().
| rb_nativethread_id_t rb_nativethread_self | ( | void | ) |
Definition at line 1675 of file thread_pthread.c.
| int rb_reserved_fd_p | ( | int | fd | ) |
Definition at line 1657 of file thread_pthread.c.
Referenced by rb_io_initialize(), and rsock_init_sock().
| static void rb_thread_create_timer_thread | ( | void | ) | [static] |
Definition at line 1527 of file thread_pthread.c.
References EXIT_FAILURE, GET_VM, NULL, rb_bug(), strerror(), THREAD_DEBUG, thread_timer(), and timer_thread_id.
Referenced by Init_Thread(), and rb_thread_start_timer_thread().
| void rb_thread_wakeup_timer_thread | ( | void | ) |
Definition at line 1466 of file thread_pthread.c.
Referenced by native_stop_timer_thread(), and sighandler().
| static void rb_thread_wakeup_timer_thread_low | ( | void | ) | [static] |
Definition at line 1467 of file thread_pthread.c.
Referenced by gvl_acquire_common().
| void ruby_init_stack | ( | volatile VALUE * | addr | ) |
Definition at line 716 of file thread_pthread.c.
References getrlimit(), IS_STACK_DIR_UPPER, native_main_thread, reserve_stack, RUBY_VM_THREAD_VM_STACK_SIZE, STACK_GROW_DIR_DETECTION, and STACK_UPPER.
Referenced by Init_stack(), ruby_cleanup(), ruby_exec_node(), ruby_options(), and ruby_setup().
| static rb_thread_t* ruby_thread_from_native | ( | void | ) | [static] |
Definition at line 433 of file thread_pthread.c.
References ruby_native_thread_key.
Referenced by rb_thread_blocking_region_end(), rb_thread_call_with_gvl(), ruby_native_thread_p(), and ruby_thread_has_gvl_p().
| static int ruby_thread_set_native | ( | rb_thread_t * | th | ) | [static] |
Definition at line 439 of file thread_pthread.c.
References ruby_native_thread_key.
Referenced by native_thread_init(), and thread_start_func_2().
| static size_t space_size | ( | size_t | stack_size | ) | [static] |
Definition at line 643 of file thread_pthread.c.
References RUBY_STACK_SPACE_LIMIT, and RUBY_STACK_SPACE_RATIO.
Referenced by native_thread_create(), and vm_expandarray().
| static void* thread_start_func_1 | ( | void * | th_ptr | ) | [static] |
Definition at line 846 of file thread_pthread.c.
References rb_thread_struct::machine, native_thread_init(), native_thread_init_stack(), rb_thread_struct::stack_start, stack_start, rb_thread_struct::thread_id, thread_start(), and thread_start_func_2.
Referenced by native_thread_create().
| static void* thread_timer | ( | void * | p | ) | [static] |
Definition at line 1492 of file thread_pthread.c.
References native_cond_destroy(), native_cond_initialize(), native_mutex_destroy(), native_mutex_initialize(), native_mutex_lock(), native_mutex_unlock(), NULL, ping_signal_thread_list(), RB_CONDATTR_CLOCK_MONOTONIC, SET_THREAD_NAME, system_working, timer_thread_function(), timer_thread_sleep(), TT_DEBUG, and WRITE_CONST.
Referenced by rb_thread_create_timer_thread().
| static void timer_thread_sleep | ( | rb_global_vm_lock_t * | unused | ) | [inline, static] |
Definition at line 1473 of file thread_pthread.c.
References native_cond_timedwait(), native_cond_timeout(), and TIME_QUANTUM_USEC.
Referenced by thread_timer().
| static void ubf_pthread_cond_signal | ( | void * | ptr | ) | [static] |
Definition at line 1071 of file thread_pthread.c.
References native_cond_signal(), and thread_debug.
Referenced by native_sleep().
| static int use_cached_thread | ( | rb_thread_t * | th | ) | [static] |
Definition at line 942 of file thread_pthread.c.
References cached_thread_entry::cond, native_cond_signal(), cached_thread_entry::next, result, and cached_thread_entry::th_area.
Referenced by native_thread_create().
Definition at line 625 of file thread_pthread.c.
struct { ... } native_main_thread [static] |
Referenced by native_thread_init_stack(), and ruby_init_stack().
pthread_key_t ruby_native_thread_key [static] |
Definition at line 424 of file thread_pthread.c.
Referenced by Init_native_thread(), ruby_thread_from_native(), and ruby_thread_set_native().
| size_t stack_maxsize |
Definition at line 626 of file thread_pthread.c.
| VALUE* stack_start |
Definition at line 627 of file thread_pthread.c.
Referenced by mark_current_machine_context(), rb_gc_mark_machine_stack(), and thread_start_func_1().
rb_nativethread_cond_t timer_thread_cond [static] |
Definition at line 1470 of file thread_pthread.c.
pthread_t timer_thread_id [static] |
Definition at line 48 of file thread_pthread.c.
Referenced by native_stop_timer_thread(), rb_thread_create_timer_thread(), and rb_thread_stop_timer_thread().
pthread_mutex_t timer_thread_lock [static] |
Definition at line 1469 of file thread_pthread.c.
1.6.1