Rizin
unix-like reverse engineering framework and cli tools
|
Go to the source code of this file.
Macros | |
#define | MAX_THREADPOOL_SIZE 1024 |
Functions | |
static unsigned int | slow_work_thread_threshold (void) |
static void | uv__cancelled (struct uv__work *w) |
static void | worker (void *arg) |
static void | post (QUEUE *q, enum uv__work_kind kind) |
void | uv__threadpool_cleanup (void) |
static void | init_threads (void) |
static void | reset_once (void) |
static void | init_once (void) |
void | uv__work_submit (uv_loop_t *loop, struct uv__work *w, enum uv__work_kind kind, void(*work)(struct uv__work *w), void(*done)(struct uv__work *w, int status)) |
static int | uv__work_cancel (uv_loop_t *loop, uv_req_t *req, struct uv__work *w) |
void | uv__work_done (uv_async_t *handle) |
static void | uv__queue_work (struct uv__work *w) |
static void | uv__queue_done (struct uv__work *w, int err) |
int | uv_queue_work (uv_loop_t *loop, uv_work_t *req, uv_work_cb work_cb, uv_after_work_cb after_work_cb) |
int | uv_cancel (uv_req_t *req) |
Variables | |
static uv_once_t | once = UV_ONCE_INIT |
static uv_cond_t | cond |
static uv_mutex_t | mutex |
static unsigned int | idle_threads |
static unsigned int | slow_io_work_running |
static unsigned int | nthreads |
static uv_thread_t * | threads |
static uv_thread_t | default_threads [4] |
static QUEUE | exit_message |
static QUEUE | wq |
static QUEUE | run_slow_work_message |
static QUEUE | slow_io_pending_wq |
#define MAX_THREADPOOL_SIZE 1024 |
Definition at line 30 of file threadpool.c.
|
static |
Definition at line 243 of file threadpool.c.
References init_threads(), NULL, and reset_once().
Referenced by uv__work_submit().
|
static |
Definition at line 188 of file threadpool.c.
References ARRAY_SIZE, cond, default_threads, getenv(), i, MAX_THREADPOOL_SIZE, mutex, nthreads, NULL, QUEUE_INIT, run_slow_work_message, slow_io_pending_wq, threads, uv__malloc(), uv_cond_init(), uv_mutex_init(), uv_sem_destroy(), uv_sem_init(), uv_sem_wait(), uv_thread_create(), val, worker(), and wq.
Referenced by init_once().
|
static |
Definition at line 142 of file threadpool.c.
References cond, idle_threads, mutex, QUEUE_EMPTY, QUEUE_INSERT_TAIL, run_slow_work_message, slow_io_pending_wq, UV__WORK_SLOW_IO, uv_cond_signal(), uv_mutex_lock(), uv_mutex_unlock(), and wq.
Referenced by cs_op_index(), sh_apply_effects(), sh_il_set_param_pc_ctx(), uv__threadpool_cleanup(), and uv__work_submit().
|
static |
Definition at line 236 of file threadpool.c.
References memcpy(), once, and UV_ONCE_INIT.
Referenced by init_once().
|
static |
Definition at line 49 of file threadpool.c.
Referenced by uv__work_cancel(), and uv__work_done().
Definition at line 325 of file threadpool.c.
References container_of, err, NULL, req, uv__req_unregister, and w.
Referenced by uv_queue_work().
|
static |
Definition at line 318 of file threadpool.c.
References container_of, req, and w.
Referenced by uv_queue_work().
void uv__threadpool_cleanup | ( | void | ) |
Definition at line 163 of file threadpool.c.
References cond, default_threads, exit_message, i, mutex, nthreads, NULL, post(), threads, uv__free(), UV__WORK_CPU, uv_cond_destroy(), uv_mutex_destroy(), and uv_thread_join().
Referenced by uv_library_shutdown().
Definition at line 269 of file threadpool.c.
References loop, mutex, NULL, QUEUE_EMPTY, QUEUE_INSERT_TAIL, QUEUE_REMOVE, uv__cancelled(), uv_async_send(), uv_mutex_lock(), uv_mutex_unlock(), and w.
Referenced by uv_cancel().
void uv__work_done | ( | uv_async_t * | handle | ) |
Definition at line 295 of file threadpool.c.
References container_of, err, handle, loop, QUEUE_EMPTY, QUEUE_HEAD, QUEUE_MOVE, QUEUE_REMOVE, uv__cancelled(), uv_mutex_lock(), uv_mutex_unlock(), w, and wq.
Referenced by uv_loop_init().
void uv__work_submit | ( | uv_loop_t * | loop, |
struct uv__work * | w, | ||
enum uv__work_kind | kind, | ||
void(*)(struct uv__work *w) | work, | ||
void(*)(struct uv__work *w, int status) | done | ||
) |
Definition at line 256 of file threadpool.c.
References done, init_once(), loop, once, post(), uv_once(), w, and uv__work::work.
Referenced by uv_getaddrinfo(), uv_getnameinfo(), uv_queue_work(), and uv_random().
Definition at line 358 of file threadpool.c.
References loop, req, and uv__work_cancel().
Referenced by signal_handler().
int uv_queue_work | ( | uv_loop_t * | loop, |
uv_work_t * | req, | ||
uv_work_cb | work_cb, | ||
uv_after_work_cb | after_work_cb | ||
) |
Definition at line 338 of file threadpool.c.
References loop, NULL, req, uv__queue_done(), uv__queue_work(), uv__req_init, UV__WORK_CPU, and uv__work_submit().
Referenced by main().
|
static |
Definition at line 57 of file threadpool.c.
References cond, exit_message, idle_threads, mutex, NULL, QUEUE_DATA, QUEUE_EMPTY, QUEUE_HEAD, QUEUE_INIT, QUEUE_INSERT_TAIL, QUEUE_NEXT, QUEUE_REMOVE, run_slow_work_message, slow_io_pending_wq, slow_io_work_running, slow_work_thread_threshold(), uv_async_send(), uv_cond_signal(), uv_cond_wait(), uv_mutex_lock(), uv_mutex_unlock(), uv_sem_post(), w, and wq.
Referenced by init_threads(), on_new_connection(), and setup_workers().
|
static |
Definition at line 33 of file threadpool.c.
Referenced by init_threads(), post(), uv__threadpool_cleanup(), and worker().
|
static |
Definition at line 39 of file threadpool.c.
Referenced by init_threads(), and uv__threadpool_cleanup().
|
static |
Definition at line 40 of file threadpool.c.
Referenced by uv__threadpool_cleanup(), and worker().
Definition at line 35 of file threadpool.c.
|
static |
Definition at line 34 of file threadpool.c.
Referenced by init_threads(), post(), uv__threadpool_cleanup(), uv__work_cancel(), uv_cond_destroy(), uv_cond_timedwait(), uv_cond_wait(), uv_mutex_destroy(), uv_mutex_init(), uv_mutex_init_recursive(), uv_mutex_lock(), uv_mutex_trylock(), uv_mutex_unlock(), and worker().
Definition at line 37 of file threadpool.c.
Referenced by init_threads(), slow_work_thread_threshold(), and uv__threadpool_cleanup().
|
static |
Definition at line 32 of file threadpool.c.
Referenced by crc32_combine64(), crc32_combine_gen64(), crc32_z(), ds_print_meta_infos(), get_crc_table(), reset_once(), rz_core_serve(), uv__fs_mkstemp(), uv__udp_sendmsg(), uv__work_submit(), and uv_udp_using_recvmmsg().
|
static |
Definition at line 42 of file threadpool.c.
Referenced by init_threads(), post(), and worker().
|
static |
Definition at line 43 of file threadpool.c.
Referenced by init_threads(), post(), and worker().
Definition at line 36 of file threadpool.c.
Referenced by worker().
|
static |
Definition at line 38 of file threadpool.c.
Referenced by get_options(), init_threads(), lzma_outq_init(), lzma_outq_memusage(), main(), rz_debug_dmp_threads(), rz_debug_winkd_threads(), RZ_PACKED(), rz_xnu_get_cur_thread(), uv__threadpool_cleanup(), and xnu_dealloc_threads().
|
static |
Definition at line 41 of file threadpool.c.
Referenced by init_threads(), post(), uv__work_done(), and worker().