Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Classes | |
struct | thread_ctx |
Variables | |
static uv_key_t | uv__current_thread_key |
static uv_once_t | uv__current_thread_init_guard = UV_ONCE_INIT |
STATIC_ASSERT | ( | sizeof(uv_thread_t)<=sizeof(void *) | ) |
|
static |
Definition at line 84 of file thread.c.
References uv__current_thread_key, and uv_key_create().
Referenced by uv__thread_start(), and uv_thread_self().
|
static |
|
static |
Definition at line 97 of file thread.c.
References arg(), uv__current_thread_init_guard, uv__current_thread_key, uv__free(), uv__init_current_thread_key(), uv_key_set(), and uv_once().
Referenced by uv_thread_create_ex().
void uv_barrier_destroy | ( | uv_barrier_t * | barrier | ) |
Definition at line 456 of file thread.c.
References assert(), uv_barrier_t::b, b, uv_barrier_t::mutex, NULL, uv_barrier_t::turnstile1, uv_barrier_t::turnstile2, uv__free(), uv_cond_destroy(), uv_mutex_destroy(), uv_mutex_lock(), uv_mutex_unlock(), and uv_sem_destroy().
Referenced by main().
int uv_barrier_init | ( | uv_barrier_t * | barrier, |
unsigned int | count | ||
) |
Definition at line 427 of file thread.c.
References uv_barrier_t::b, b, count, uv_barrier_t::count, err, error(), uv_barrier_t::mutex, uv_barrier_t::n, NULL, uv_barrier_t::turnstile1, uv_barrier_t::turnstile2, uv__free(), uv__malloc(), uv_cond_init(), uv_mutex_destroy(), uv_mutex_init(), uv_sem_destroy(), and uv_sem_init().
Referenced by main().
int uv_barrier_wait | ( | uv_barrier_t * | barrier | ) |
Definition at line 463 of file thread.c.
References uv_barrier_t::b, b, uv_barrier_t::count, uv_barrier_t::mutex, uv_barrier_t::n, NULL, uv_barrier_t::turnstile1, uv_barrier_t::turnstile2, uv_cond_signal(), uv_cond_wait(), uv_mutex_lock(), uv_mutex_unlock(), uv_sem_post(), and uv_sem_wait().
void uv_cond_broadcast | ( | uv_cond_t * | cond | ) |
void uv_cond_destroy | ( | uv_cond_t * | cond | ) |
Definition at line 397 of file thread.c.
References cond, err, ETIMEDOUT, mutex, NULL, timespec::tv_nsec, and timespec::tv_sec.
Referenced by uv__threadpool_cleanup().
void uv_cond_signal | ( | uv_cond_t * | cond | ) |
int uv_cond_timedwait | ( | uv_cond_t * | cond, |
uv_mutex_t * | mutex, | ||
uint64_t | timeout | ||
) |
Definition at line 418 of file thread.c.
References cond, DWORD, ETIMEDOUT, gettimeofday, mutex, NANOSEC, NULL, r, timeout, tv, timespec::tv_nsec, timespec::tv_sec, uv__hrtime(), and UV_CLOCK_PRECISE.
void uv_cond_wait | ( | uv_cond_t * | cond, |
uv_mutex_t * | mutex | ||
) |
Definition at line 490 of file thread.c.
void uv_key_delete | ( | uv_key_t * | key | ) |
void* uv_key_get | ( | uv_key_t * | key | ) |
void uv_key_set | ( | uv_key_t * | key, |
void * | value | ||
) |
void uv_mutex_destroy | ( | uv_mutex_t * | mutex | ) |
Definition at line 218 of file thread.c.
References mutex.
Referenced by child_fork(), uv__loop_close(), uv__threadpool_cleanup(), and uv_loop_init().
int uv_mutex_init | ( | uv_mutex_t * | mutex | ) |
Definition at line 207 of file thread.c.
References err, mutex, NULL, and UV__ERR.
Referenced by epoll_init(), init_process_title_mutex_once(), init_threads(), uv__fd_hash_init(), uv__loops_init(), uv_console_init(), and uv_loop_init().
int uv_mutex_init_recursive | ( | uv_mutex_t * | mutex | ) |
void uv_mutex_lock | ( | uv_mutex_t * | mutex | ) |
Definition at line 223 of file thread.c.
References mutex.
Referenced by before_fork(), epoll_create1(), epoll_ctl(), epoll_file_close(), epoll_queue_close(), post(), uv__fd_hash_add(), uv__fd_hash_get(), uv__fd_hash_remove(), uv__loop_close(), uv__loops_add(), uv__loops_remove(), uv__metrics_set_provider_entry_time(), uv__metrics_update_idle_time(), uv__tty_console_signal_resize(), uv__wake_all_loops(), uv__work_cancel(), uv__work_done(), uv_exepath(), uv_get_process_title(), uv_metrics_idle_time(), uv_set_process_title(), uv_setup_args(), and worker().
int uv_mutex_trylock | ( | uv_mutex_t * | mutex | ) |
void uv_mutex_unlock | ( | uv_mutex_t * | mutex | ) |
Definition at line 236 of file thread.c.
References mutex.
Referenced by after_fork(), child_fork(), epoll_create1(), epoll_ctl(), epoll_file_close(), epoll_queue_close(), post(), uv__fd_hash_add(), uv__fd_hash_get(), uv__fd_hash_remove(), uv__loop_close(), uv__loops_add(), uv__loops_remove(), uv__metrics_set_provider_entry_time(), uv__metrics_update_idle_time(), uv__tty_console_signal_resize(), uv__wake_all_loops(), uv__work_cancel(), uv__work_done(), uv_exepath(), uv_get_process_title(), uv_metrics_idle_time(), uv_set_process_title(), uv_setup_args(), and worker().
void uv_once | ( | uv_once_t * | guard, |
void(*)(void) | callback | ||
) |
Definition at line 67 of file thread.c.
References uv__once_inner().
Referenced by epoll_create1(), epoll_file_close(), uv__fs_mkstemp(), uv__get_overlapped_dummy(), uv__hrtime(), uv__once_init(), uv__random_devurandom(), uv__random_getentropy(), uv__random_getrandom_init(), uv__signal_global_once_init(), uv__udp_sendmsg(), uv__work_submit(), uv_exepath(), uv_get_process_title(), uv_set_process_title(), uv_setup_args(), uv_spawn(), and uv_udp_using_recvmmsg().
void uv_rwlock_destroy | ( | uv_rwlock_t * | rwlock | ) |
Definition at line 258 of file thread.c.
References uv_rwlock_t::num_readers_lock_, uv_rwlock_t::state_, and uv_rwlock_t::write_semaphore_.
Referenced by main(), uv__loop_close(), and uv_loop_init().
int uv_rwlock_init | ( | uv_rwlock_t * | rwlock | ) |
Definition at line 241 of file thread.c.
References handle, HANDLE, NULL, uv_rwlock_t::num_readers_, uv_rwlock_t::num_readers_lock_, uv_rwlock_t::state_, UV__ERR, uv_translate_sys_error(), and uv_rwlock_t::write_semaphore_.
Referenced by main(), and uv_loop_init().
void uv_rwlock_rdlock | ( | uv_rwlock_t * | rwlock | ) |
Definition at line 264 of file thread.c.
References DWORD, uv_rwlock_t::num_readers_, uv_rwlock_t::num_readers_lock_, r, uv_rwlock_t::state_, uv_fatal_error(), and uv_rwlock_t::write_semaphore_.
Referenced by reader(), uv__fs_mkstemp(), and uv__fs_open().
void uv_rwlock_rdunlock | ( | uv_rwlock_t * | rwlock | ) |
Definition at line 314 of file thread.c.
References NULL, uv_rwlock_t::num_readers_, uv_rwlock_t::num_readers_lock_, uv_rwlock_t::state_, uv_fatal_error(), and uv_rwlock_t::write_semaphore_.
Referenced by reader(), uv__fs_mkstemp(), and uv__fs_open().
int uv_rwlock_tryrdlock | ( | uv_rwlock_t * | rwlock | ) |
Definition at line 282 of file thread.c.
References DWORD, EAGAIN, EBUSY, err, uv_rwlock_t::num_readers_, uv_rwlock_t::num_readers_lock_, r, uv_rwlock_t::state_, uv_fatal_error(), and uv_rwlock_t::write_semaphore_.
int uv_rwlock_trywrlock | ( | uv_rwlock_t * | rwlock | ) |
Definition at line 333 of file thread.c.
References DWORD, EAGAIN, EBUSY, err, r, uv_rwlock_t::state_, uv_fatal_error(), and uv_rwlock_t::write_semaphore_.
void uv_rwlock_wrlock | ( | uv_rwlock_t * | rwlock | ) |
Definition at line 326 of file thread.c.
References DWORD, r, uv_rwlock_t::state_, uv_fatal_error(), and uv_rwlock_t::write_semaphore_.
Referenced by uv_spawn(), and writer().
void uv_rwlock_wrunlock | ( | uv_rwlock_t * | rwlock | ) |
Definition at line 344 of file thread.c.
References NULL, uv_rwlock_t::state_, uv_fatal_error(), and uv_rwlock_t::write_semaphore_.
Referenced by uv_spawn(), and writer().
void uv_sem_destroy | ( | uv_sem_t * | sem | ) |
Definition at line 359 of file thread.c.
References platform_needs_custom_semaphore, uv__custom_sem_destroy(), and uv__sem_destroy().
Referenced by init_threads(), and uv__stream_close().
Definition at line 350 of file thread.c.
References INT_MAX, NULL, platform_needs_custom_semaphore, uv__custom_sem_init(), uv__sem_init(), uv_once(), uv_translate_sys_error(), and value.
Referenced by init_threads(), and uv_console_init().
void uv_sem_post | ( | uv_sem_t * | sem | ) |
Definition at line 365 of file thread.c.
References NULL, platform_needs_custom_semaphore, uv__custom_sem_post(), and uv__sem_post().
Referenced by uv__cancel_read_console(), uv__stream_close(), uv_tty_get_vterm_state(), uv_tty_get_winsize(), uv_tty_init(), uv_tty_line_read_thread(), uv_tty_set_mode(), uv_tty_set_vterm_state(), uv_tty_write_bufs(), and worker().
Definition at line 377 of file thread.c.
References DWORD, platform_needs_custom_semaphore, r, uv__custom_sem_trywait(), and uv__sem_trywait().
void uv_sem_wait | ( | uv_sem_t * | sem | ) |
Definition at line 371 of file thread.c.
References platform_needs_custom_semaphore, uv__custom_sem_wait(), and uv__sem_wait().
Referenced by init_threads(), uv__cancel_read_console(), uv_tty_get_vterm_state(), uv_tty_get_winsize(), uv_tty_init(), uv_tty_set_mode(), uv_tty_set_vterm_state(), and uv_tty_write_bufs().
int uv_thread_create | ( | uv_thread_t * | tid, |
void(*)(void *arg) | entry, | ||
void * | arg | ||
) |
Definition at line 114 of file thread.c.
References uv_thread_options_s::flags, uv_thread_create_ex(), and UV_THREAD_NO_FLAGS.
Referenced by init_threads(), and main().
int uv_thread_create_ex | ( | uv_thread_t * | tid, |
const uv_thread_options_t * | params, | ||
void(*)(void *arg) | entry, | ||
void * | arg | ||
) |
Definition at line 120 of file thread.c.
References arg(), EACCES, EAGAIN, EINVAL, thread_ctx::entry, err, f, uv_thread_options_s::flags, HANDLE, in, NULL, uv_thread_options_s::stack_size, sysinfo, thread_stack_size(), UV__ERR, uv__free(), uv__malloc(), uv__thread_start(), and UV_THREAD_HAS_STACK_SIZE.
int uv_thread_equal | ( | const uv_thread_t * | t1, |
const uv_thread_t * | t2 | ||
) |
Definition at line 202 of file thread.c.
References benchmark::t1.
int uv_thread_join | ( | uv_thread_t * | tid | ) |
Definition at line 190 of file thread.c.
References NULL, UV__ERR, and uv_translate_sys_error().
Referenced by main(), uv__stream_close(), and uv__threadpool_cleanup().
uv_thread_t uv_thread_self | ( | void | ) |
Definition at line 184 of file thread.c.
References uv__current_thread_init_guard, uv__current_thread_key, uv__init_current_thread_key(), uv_key_get(), and uv_once().
|
static |
Definition at line 81 of file thread.c.
Referenced by uv__thread_start(), and uv_thread_self().
|
static |
Definition at line 80 of file thread.c.
Referenced by uv__init_current_thread_key(), uv__thread_start(), and uv_thread_self().