Rizin
unix-like reverse engineering framework and cli tools
|
#include <assert.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "uv.h"
#include "internal.h"
#include "queue.h"
#include "handle-inl.h"
#include "heap-inl.h"
#include "req-inl.h"
Go to the source code of this file.
Macros | |
#define | UV__LOOPS_CHUNK_SIZE 8 |
Variables | |
static uv_once_t | uv_init_guard_ = UV_ONCE_INIT |
UV_THREAD_LOCAL int | uv__crt_assert_enabled = FALSE |
static uv_loop_t ** | uv__loops |
static int | uv__loops_size |
static int | uv__loops_capacity |
static uv_mutex_t | uv__loops_lock |
int uv__getsockpeername | ( | const uv_handle_t * | handle, |
uv__peersockfunc | func, | ||
struct sockaddr * | name, | ||
int * | namelen, | ||
int | delayed_error | ||
) |
Definition at line 727 of file core.c.
References fd, handle, uv_fileno(), and uv_translate_sys_error().
Definition at line 584 of file core.c.
References loop, NULL, uv__has_active_handles, and uv__has_active_reqs.
Referenced by uv_loop_alive(), and uv_run().
void uv__loop_close | ( | uv_loop_t * | loop | ) |
Definition at line 334 of file core.c.
References ARRAY_SIZE, assert(), i, uv_loop_s::internal_fields, uv__loop_metrics_s::lock, loop, uv__loop_internal_fields_s::loop_metrics, NULL, QUEUE_EMPTY, uv__free(), uv__get_internal_fields, uv__handle_close, uv__handle_closing, uv__has_active_reqs, uv__loops_remove(), uv_mutex_destroy(), uv_mutex_lock(), and uv_mutex_unlock().
int uv__loop_configure | ( | uv_loop_t * | loop, |
uv_loop_option | option, | ||
va_list | ap | ||
) |
Definition at line 375 of file core.c.
References uv__loop_internal_fields_s::flags, loop, uv__get_internal_fields, and UV_METRICS_IDLE_TIME.
Definition at line 91 of file core.c.
References i, loop, NULL, uv__loops, uv__loops_capacity, UV__LOOPS_CHUNK_SIZE, uv__loops_lock, uv__loops_size, uv__realloc(), uv_mutex_lock(), and uv_mutex_unlock().
Referenced by uv_loop_init().
|
static |
Definition at line 87 of file core.c.
References uv__loops_lock, and uv_mutex_init().
Referenced by uv_init().
|
static |
Definition at line 118 of file core.c.
References loop, NULL, uv__free(), uv__loops, uv__loops_capacity, UV__LOOPS_CHUNK_SIZE, uv__loops_lock, uv__loops_size, uv__realloc(), uv_mutex_lock(), and uv_mutex_unlock().
Referenced by uv__loop_close().
void uv__once_init | ( | void | ) |
Definition at line 329 of file core.c.
References uv_init(), uv_init_guard_, and uv_once().
Referenced by uv__pipe_getname(), uv__random(), uv_cpu_info(), uv_fs_req_init(), uv_get_process_title(), uv_hrtime(), uv_loop_init(), uv_os_gethostname(), uv_os_uname(), uv_pipe_open(), uv_set_process_title(), and uv_tty_init().
Definition at line 497 of file core.c.
References ARRAY_SIZE, count, DWORD, FALSE, flags, i, loop, pGetQueuedCompletionStatusEx, repeat(), req, timeout, ULONG, uv__get_internal_fields, uv__metrics_set_provider_entry_time(), uv__metrics_update_idle_time(), uv_fatal_error(), uv_insert_pending_req(), UV_METRICS_IDLE_TIME, uv_overlapped_to_req(), and uv_update_time().
Referenced by uv_run().
Definition at line 418 of file core.c.
References bytes, DWORD, flags, key, loop, repeat(), req, timeout, uv__get_internal_fields, uv__metrics_set_provider_entry_time(), uv__metrics_update_idle_time(), uv_fatal_error(), uv_insert_pending_req(), UV_METRICS_IDLE_TIME, uv_overlapped_to_req(), and uv_update_time().
Referenced by uv_run().
int uv__socket_sockopt | ( | uv_handle_t * | handle, |
int | optname, | ||
int * | value | ||
) |
Definition at line 695 of file core.c.
References handle, len, NULL, r, socket, SOL_SOCKET, uv_translate_sys_error(), and value.
void uv__wake_all_loops | ( | void | ) |
Definition at line 162 of file core.c.
References assert(), i, INVALID_HANDLE_VALUE, loop, NULL, uv__loops, uv__loops_lock, uv__loops_size, uv_mutex_lock(), and uv_mutex_unlock().
Referenced by uv__system_resume_callback().
Definition at line 398 of file core.c.
References loop, QUEUE_EMPTY, uv_loop_s::stop_flag, uv__has_active_handles, uv__has_active_reqs, and uv__next_timeout().
int uv_cpumask_size | ( | void | ) |
int uv_fileno | ( | const uv_handle_t * | handle, |
uv_os_fd_t * | fd | ||
) |
Definition at line 659 of file core.c.
References fd, handle, INVALID_HANDLE_VALUE, socket, uv__is_closing, uv__stream_fd, and uv_is_closing().
Referenced by on_new_connection().
|
static |
Definition at line 176 of file core.c.
References uv__crt_invalid_parameter_handler(), uv__init_detect_system_wakeup(), uv__loops_init(), uv__util_init(), uv_console_init(), uv_fs_init(), uv_signals_init(), uv_winapi_init(), and uv_winsock_init().
Referenced by uv__once_init().
Definition at line 393 of file core.c.
References err, i, loop, NULL, QUEUE_EMPTY, QUEUE_INSERT_TAIL, uv__async_fork(), uv__io_fork(), uv__signal_loop_fork(), and w.
Definition at line 224 of file core.c.
References uv_loop_s::active_handles, uv_loop_s::active_reqs, uv_loop_s::count, uv_loop_s::data, err, uv_loop_s::handle_queue, uv_loop_s::internal_fields, INVALID_HANDLE_VALUE, uv__loop_metrics_s::lock, loop, uv__loop_internal_fields_s::loop_metrics, memset(), NULL, QUEUE_INIT, uv_loop_s::stop_flag, timer_heap(), uv__calloc(), uv__free(), uv__handle_unref, uv__loops_add(), uv__malloc(), uv__once_init(), uv__platform_loop_delete(), uv__platform_loop_init(), uv__signal_global_once_init(), uv__signal_loop_cleanup(), uv__work_done(), uv_async_init(), UV_HANDLE_INTERNAL, uv_mutex_destroy(), uv_mutex_init(), uv_rwlock_destroy(), uv_rwlock_init(), uv_signal_init(), uv_translate_sys_error(), and uv_update_time().
Referenced by create_loop(), main(), uv_default_loop(), and uv_loop_new().
int uv_run | ( | uv_loop_t * | loop, |
uv_run_mode | mode | ||
) |
Definition at line 596 of file core.c.
References DWORD, loop, pGetQueuedCompletionStatusEx, r, uv_loop_s::stop_flag, timeout, uv__io_poll(), uv__loop_alive(), uv__metrics_update_idle_time(), uv__poll(), uv__poll_wine(), uv__run_check(), uv__run_closing_handles(), uv__run_idle(), uv__run_pending(), uv__run_prepare(), uv__run_timers(), uv_backend_timeout(), uv_check_invoke(), uv_idle_invoke(), uv_prepare_invoke(), uv_process_endgames(), uv_process_reqs(), UV_RUN_DEFAULT, UV_RUN_NOWAIT, UV_RUN_ONCE, and uv_update_time().
Referenced by main(), thread1_worker(), and thread2_worker().
void uv_update_time | ( | uv_loop_t * | loop | ) |
UV_THREAD_LOCAL int uv__crt_assert_enabled = FALSE |
|
static |
Definition at line 81 of file core.c.
Referenced by uv__loops_add(), uv__loops_remove(), and uv__wake_all_loops().
|
static |
Definition at line 83 of file core.c.
Referenced by uv__loops_add(), and uv__loops_remove().
|
static |
Definition at line 85 of file core.c.
Referenced by uv__loops_add(), uv__loops_init(), uv__loops_remove(), and uv__wake_all_loops().
|
static |
Definition at line 82 of file core.c.
Referenced by uv__loops_add(), uv__loops_remove(), and uv__wake_all_loops().
|
static |
Definition at line 40 of file core.c.
Referenced by uv__once_init().