Rizin
unix-like reverse engineering framework and cli tools
|
#include "uv.h"
#include "internal.h"
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <limits.h>
#include <sys/uio.h>
#include <sys/resource.h>
#include <pwd.h>
#include <sys/utsname.h>
#include <sys/time.h>
Go to the source code of this file.
Macros | |
#define | CHECK_ENV_VAR(name) |
Variables | |
char ** | environ |
#define CHECK_ENV_VAR | ( | name | ) |
Definition at line 830 of file core.c.
References i, len, loop, next_power_of_two(), NULL, and uv__reallocf().
Referenced by uv__io_start().
Definition at line 489 of file core.c.
References accept, assert(), EINTR, err, NULL, sockfd, uv__cloexec, uv__close(), UV__ERR, and uv__nonblock.
Referenced by uv__emfile_trick(), and uv__server_io().
Definition at line 639 of file core.c.
References EINTR, F_GETFD, F_SETFD, fcntl, fd, FD_CLOEXEC, flags, r, and UV__ERR.
Referenced by uv__process_child_init().
Definition at line 569 of file core.c.
References assert(), epoll_file_close(), fd, SAVE_ERRNO, STDERR_FILENO, and uv__close_nocheckstdio().
Referenced by mkdtemp(), new_socket(), uv__accept(), uv__async_stop(), uv__dup2_cloexec(), uv__emfile_trick(), uv__fs_mkstemp(), uv__fs_open(), uv__interface_addresses_v6(), uv__io_fork(), uv__loop_close(), uv__make_pipe(), uv__make_socketpair(), uv__open_cloexec(), uv__open_file(), uv__platform_loop_delete(), uv__platform_loop_init(), uv__process_child_init(), uv__process_open_stream(), uv__random_readpath(), uv__set_phys_addr(), uv__signal_cleanup(), uv__signal_loop_cleanup(), uv__signal_loop_fork(), uv__socket(), uv__stream_close(), uv__stream_recv_cmsg(), uv__udp_close(), uv_accept(), uv_fs_event_stop(), uv_interface_addresses(), uv_pipe_bind(), uv_resident_set_memory(), uv_spawn(), and uv_tty_init().
Definition at line 530 of file core.c.
References close, fd, and syscall.
Referenced by uv__close_nocheckstdio(), and uv__fs_close().
Definition at line 550 of file core.c.
References assert(), EINPROGRESS, fd, uv__close_nocancel(), and UV__ERR.
Referenced by uv__close(), uv__fs_copyfile(), uv__slurp(), uv_fs_event_start(), and uv_spawn().
Definition at line 1031 of file core.c.
References dup2, err, O_CLOEXEC, oldfd, r, uv__cloexec, uv__close(), and UV__ERR.
Referenced by uv_tty_init().
Definition at line 965 of file core.c.
References fd, loop, and NULL.
Referenced by uv_pipe_open(), uv_poll_init(), uv_tcp_open(), and uv_udp_open().
|
static |
Definition at line 243 of file core.c.
References assert(), handle, QUEUE_REMOVE, uv__handle_unref, uv__make_close_pending(), uv__stream_destroy(), uv__udp_finish_close(), UV_HANDLE_CLOSED, and UV_HANDLE_CLOSING.
Referenced by uv__run_closing_handles().
int uv__getiovmax | ( | void | ) |
Definition at line 215 of file core.c.
References uv__load_relaxed, and uv__store_relaxed.
Referenced by uv__fs_read(), uv__fs_write_all(), and uv__write().
int uv__getpwuid_r | ( | uv_passwd_t * | pwd | ) |
Definition at line 1146 of file core.c.
References buf, ERANGE, uv_passwd_s::gid, uv_passwd_s::homedir, memcpy(), NULL, r, uv_passwd_s::shell, uv_passwd_s::uid, uv_passwd_s::username, uv__free(), and uv__malloc().
Referenced by uv_os_get_passwd(), and uv_os_homedir().
int uv__getsockpeername | ( | const uv_handle_t * | handle, |
uv__peersockfunc | func, | ||
struct sockaddr * | name, | ||
int * | namelen | ||
) |
Definition at line 1490 of file core.c.
References fd, handle, int, r, UV__ERR, and uv_fileno().
Referenced by uv__pipe_getsockpeername(), uv_tcp_getpeername(), uv_tcp_getsockname(), uv_udp_getpeername(), and uv_udp_getsockname().
Definition at line 958 of file core.c.
References assert(), UV__POLLPRI, UV__POLLRDHUP, and w.
Referenced by uv__read(), uv__stream_close(), uv__stream_destroy(), uv__stream_eof(), uv__udp_finish_close(), uv__udp_recv_start(), uv__udp_run_completed(), uv__write(), uv_read_stop(), and uv_try_write().
Definition at line 942 of file core.c.
References loop, QUEUE_REMOVE, uv__io_stop(), uv__platform_invalidate_fd(), UV__POLLPRI, UV__POLLRDHUP, and w.
Referenced by uv__stream_close(), uv__udp_close(), and uv_fs_event_stop().
Definition at line 952 of file core.c.
References loop, QUEUE_EMPTY, QUEUE_INSERT_TAIL, and w.
Referenced by uv__tcp_connect(), uv__udp_sendmsg(), uv__write_req_finish(), and uv_pipe_connect().
Definition at line 865 of file core.c.
References assert(), cb, fd, NULL, QUEUE_INIT, and w.
Referenced by init_inotify(), uv__async_start(), uv__signal_loop_once_init(), uv__stream_init(), uv__udp_init_ex(), uv_fs_event_start(), and uv_poll_init().
Definition at line 882 of file core.c.
References assert(), INT_MAX, loop, maybe_resize(), NULL, QUEUE_EMPTY, QUEUE_INSERT_TAIL, UV__POLLPRI, UV__POLLRDHUP, and w.
Referenced by init_inotify(), uv__async_start(), uv__read(), uv__server_io(), uv__signal_loop_once_init(), uv__tcp_connect(), uv__udp_recv_start(), uv__udp_send(), uv__write(), uv_accept(), uv_fs_event_start(), uv_pipe_connect(), uv_pipe_listen(), uv_poll_start(), uv_read_start(), uv_shutdown(), uv_tcp_listen(), and uv_write2().
Definition at line 910 of file core.c.
References assert(), loop, NULL, QUEUE_EMPTY, QUEUE_INIT, QUEUE_INSERT_TAIL, QUEUE_REMOVE, UV__POLLPRI, UV__POLLRDHUP, and w.
Referenced by uv__async_stop(), uv__drain(), uv__io_close(), uv__io_fork(), uv__platform_loop_delete(), uv__poll_io(), uv__poll_stop(), uv__read(), uv__server_io(), uv__signal_loop_fork(), uv__stream_connect(), uv__stream_eof(), uv__udp_run_completed(), uv__write(), uv_read_stop(), and uv_try_write().
Definition at line 353 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__make_close_pending | ( | uv_handle_t * | handle | ) |
Definition at line 208 of file core.c.
References assert(), handle, UV_HANDLE_CLOSED, and UV_HANDLE_CLOSING.
Referenced by timer_close_cb(), uv__finish_close(), uv__fs_poll_close(), and uv_close().
Definition at line 608 of file core.c.
References EINTR, F_GETFL, F_SETFL, fcntl, fd, flags, O_NONBLOCK, r, and UV__ERR.
Referenced by uv__process_child_init(), and uv_poll_init().
Definition at line 1003 of file core.c.
References err, fd, flags, O_CLOEXEC, path, uv__cloexec, uv__close(), and UV__ERR.
Referenced by uv__emfile_trick(), uv__open_file(), uv__random_readpath(), uv__slurp(), uv__stream_init(), uv_resident_set_memory(), and uv_tty_init().
FILE* uv__open_file | ( | const char * | path | ) |
Definition at line 473 of file core.c.
References fd, benchmark::FILE, NULL, O_RDONLY, path, uv__close(), and uv__open_cloexec().
Referenced by read_cpufreq(), read_models(), and uv_cpu_info().
Definition at line 670 of file core.c.
References CMSG_DATA, CMSG_FIRSTHDR, cmsghdr::cmsg_len, CMSG_NXTHDR, cmsghdr::cmsg_type, EINVAL, test_evm::end, fd, flags, msg, NULL, SCM_RIGHTS, uv__cloexec, UV__ERR, uv__load_relaxed, and uv__store_relaxed.
Referenced by uv__read().
|
static |
Definition at line 797 of file core.c.
References loop, QUEUE_DATA, QUEUE_EMPTY, QUEUE_HEAD, QUEUE_INIT, QUEUE_MOVE, QUEUE_REMOVE, and w.
Referenced by uv_run().
Definition at line 1540 of file core.c.
References access, buflen, getenv(), memcpy(), NULL, prog, snprintf, UV__ERR, uv__free(), UV__PATH_MAX, uv__strdup(), and X_OK.
Referenced by uv_exepath(), and uv_setup_args().
Definition at line 436 of file core.c.
References domain, EINVAL, err, socket, sockfd, SOL_SOCKET, type, uv__cloexec, uv__close(), UV__ERR, and uv__nonblock.
Referenced by new_socket(), uv__udp_bind(), uv__udp_init_ex(), uv_pipe_bind(), and uv_pipe_connect().
int uv__socket_sockopt | ( | uv_handle_t * | handle, |
int | optname, | ||
int * | value | ||
) |
Definition at line 180 of file core.c.
References fd, handle, len, NULL, r, SOL_SOCKET, UV__ERR, uv__stream_fd, and value.
Referenced by uv_recv_buffer_size(), and uv_send_buffer_size().
void uv_close | ( | uv_handle_t * | handle, |
uv_close_cb | close_cb | ||
) |
Definition at line 708 of file core.c.
void uv_disable_stdio_inheritance | ( | void | ) |
int uv_fileno | ( | const uv_handle_t * | handle, |
uv_os_fd_t * | fd | ||
) |
uv_os_fd_t uv_get_osfhandle | ( | int | fd | ) |
int uv_getrusage | ( | uv_rusage_t * | rusage | ) |
Definition at line 970 of file core.c.
int uv_gettimeofday | ( | uv_timeval64_t * | tv | ) |
Definition at line 1512 of file core.c.
int uv_is_active | ( | const uv_handle_t * | handle | ) |
int uv_is_closing | ( | const uv_handle_t * | handle | ) |
Definition at line 323 of file core.c.
Referenced by uv_fileno().
int uv_open_osfhandle | ( | uv_os_fd_t | os_fd | ) |
int uv_os_environ | ( | uv_env_item_t ** | envitems, |
int * | count | ||
) |
Definition at line 1255 of file core.c.
void uv_os_free_passwd | ( | uv_passwd_t * | pwd | ) |
int uv_os_get_passwd | ( | uv_passwd_t * | pwd | ) |
uv_pid_t uv_os_getpid | ( | void | ) |
uv_pid_t uv_os_getppid | ( | void | ) |
Definition at line 1407 of file core.c.
Definition at line 1424 of file core.c.
int uv_os_uname | ( | uv_utsname_t * | buffer | ) |
Definition at line 1435 of file core.c.
int uv_run | ( | uv_loop_t * | loop, |
uv_run_mode | mode | ||
) |
Definition at line 365 of file core.c.
Definition at line 1526 of file core.c.
Definition at line 1249 of file core.c.
Referenced by uv__getsockpeername(), uv__socket_sockopt(), and uv_loop_init().
void uv_update_time | ( | uv_loop_t * | loop | ) |
Definition at line 425 of file core.c.
Referenced by uv__poll(), uv__poll_wine(), uv_loop_init(), and uv_run().
|
extern |
Referenced by create_child_env(), rz_sys_clearenv(), rz_sys_get_environ(), rz_sys_set_environ(), and uv_os_environ().