Rizin
unix-like reverse engineering framework and cli tools
|
#include "os390-syscalls.h"
#include <errno.h>
#include <stdlib.h>
#include <search.h>
#include <termios.h>
#include <sys/msg.h>
Go to the source code of this file.
Macros | |
#define | CW_INTRPT 1 |
#define | CW_CONDVAR 32 |
#define | EP_MAX_PFDS (ULONG_MAX / sizeof(struct pollfd)) |
#define | EP_MAX_EVENTS (INT_MAX / sizeof(struct epoll_event)) |
Variables | |
static QUEUE | global_epoll_queue |
static uv_mutex_t | global_epoll_lock |
static uv_once_t | once = UV_ONCE_INIT |
#define CW_CONDVAR 32 |
Definition at line 31 of file os390-syscalls.c.
#define CW_INTRPT 1 |
Definition at line 30 of file os390-syscalls.c.
#define EP_MAX_EVENTS (INT_MAX / sizeof(struct epoll_event)) |
Definition at line 281 of file os390-syscalls.c.
#define EP_MAX_PFDS (ULONG_MAX / sizeof(struct pollfd)) |
Definition at line 280 of file os390-syscalls.c.
|
static |
Definition at line 176 of file os390-syscalls.c.
References global_epoll_lock, and uv_mutex_unlock().
Referenced by epoll_init().
|
static |
Definition at line 171 of file os390-syscalls.c.
References global_epoll_lock, and uv_mutex_lock().
Referenced by epoll_init().
|
static |
Definition at line 181 of file os390-syscalls.c.
References global_epoll_lock, global_epoll_queue, uv__os390_epoll::items, memcpy(), NULL, once, QUEUE_DATA, QUEUE_EMPTY, QUEUE_HEAD, QUEUE_REMOVE, uv__os390_epoll::size, uv__free(), uv_mutex_destroy(), uv_mutex_unlock(), and UV_ONCE_INIT.
Referenced by epoll_init().
uv__os390_epoll* epoll_create1 | ( | int | flags | ) |
Definition at line 214 of file os390-syscalls.c.
References epoll_init(), global_epoll_lock, global_epoll_queue, init_message_queue(), uv__os390_epoll::items, maybe_resize(), uv__os390_epoll::member, uv__os390_epoll::msg_queue, NULL, once, QUEUE_INSERT_TAIL, uv__os390_epoll::size, uv__malloc(), uv_mutex_lock(), uv_mutex_unlock(), and uv_once().
Referenced by uv__platform_loop_init().
int epoll_ctl | ( | uv__os390_epoll * | lst, |
int | op, | ||
int | fd, | ||
struct epoll_event * | event | ||
) |
Definition at line 237 of file os390-syscalls.c.
References EEXIST, ENOENT, EPOLL_CTL_ADD, EPOLL_CTL_DEL, EPOLL_CTL_MOD, fd, global_epoll_lock, uv__os390_epoll::items, maybe_resize(), uv__os390_epoll::size, uv_mutex_lock(), and uv_mutex_unlock().
Referenced by uv__io_check_fd(), uv__io_poll(), and uv__platform_invalidate_fd().
Definition at line 353 of file os390-syscalls.c.
References epoll_init(), fd, global_epoll_lock, global_epoll_queue, uv__os390_epoll::items, NULL, once, QUEUE_DATA, QUEUE_FOREACH, uv_mutex_lock(), uv_mutex_unlock(), and uv_once().
Referenced by uv__close().
|
static |
Definition at line 204 of file os390-syscalls.c.
References after_fork(), before_fork(), child_fork(), global_epoll_lock, global_epoll_queue, QUEUE_INIT, and uv_mutex_init().
Referenced by epoll_create1(), and epoll_file_close().
void epoll_queue_close | ( | uv__os390_epoll * | lst | ) |
Definition at line 370 of file os390-syscalls.c.
References global_epoll_lock, uv__os390_epoll::items, uv__os390_epoll::member, uv__os390_epoll::msg_queue, NULL, QUEUE_REMOVE, uv__free(), uv_mutex_lock(), and uv_mutex_unlock().
Referenced by uv__platform_loop_delete().
int epoll_wait | ( | uv__os390_epoll * | lst, |
struct epoll_event * | events, | ||
int | maxevents, | ||
int | timeout | ||
) |
Definition at line 283 of file os390-syscalls.c.
References assert(), EFAULT, EINVAL, EP_MAX_EVENTS, EP_MAX_PFDS, epoll_event::events, epoll_event::fd, i, epoll_event::is_msg, uv__os390_epoll::items, poll, uv__os390_epoll::size, and timeout.
Referenced by uv__io_poll().
|
static |
Definition at line 145 of file os390-syscalls.c.
References header, msg, and uv__os390_epoll::msg_queue.
Referenced by epoll_create1().
|
static |
Definition at line 112 of file os390-syscalls.c.
References i, uv__os390_epoll::items, len, next_power_of_two(), NULL, uv__os390_epoll::size, and uv__reallocf().
Referenced by epoll_create1(), and epoll_ctl().
char* mkdtemp | ( | char * | path | ) |
Definition at line 424 of file os390-syscalls.c.
References EEXIST, EINVAL, fd, i, len, mkdir, NULL, O_RDONLY, path, read(), uv__close(), and v.
Referenced by uv__fs_mkdtemp(), and uv__fs_work().
Definition at line 384 of file os390-syscalls.c.
References CW_CONDVAR, CW_INTRPT, EAGAIN, EINTR, err, int, NULL, req, timespec::tv_nsec, and timespec::tv_sec.
Definition at line 484 of file os390-syscalls.c.
References ENOMEM, len, memcpy(), NULL, path, readlink, uv__free(), and uv__malloc().
Referenced by uv__fs_readlink().
int scandir | ( | const char * | maindir, |
struct dirent *** | namelist, | ||
int(*)(const struct dirent *) | filter, | ||
int(*)(const struct dirent **, const struct dirent **) | compar | ||
) |
Definition at line 40 of file os390-syscalls.c.
References count, ENOMEM, error(), filter(), memcpy(), NULL, qsort(), readdir, uv__free(), uv__malloc(), and uv__realloc().
Referenced by uv__fs_scandir(), and uv__fs_work().
int sem_destroy | ( | UV_PLATFORM_SEM_T * | semid | ) |
Definition at line 567 of file os390-syscalls.c.
References UNREACHABLE.
Referenced by ptrace_wrap_instance_start(), ptrace_wrap_instance_stop(), rz_th_sem_free(), and uv__sem_destroy().
int sem_init | ( | UV_PLATFORM_SEM_T * | semid, |
int | pshared, | ||
unsigned int | value | ||
) |
Definition at line 562 of file os390-syscalls.c.
References UNREACHABLE.
Referenced by ptrace_wrap_instance_start(), rz_th_sem_new(), and uv__sem_init().
int sem_post | ( | UV_PLATFORM_SEM_T * | semid | ) |
Definition at line 572 of file os390-syscalls.c.
References UNREACHABLE.
Referenced by ptrace_wrap(), ptrace_wrap_fork(), ptrace_wrap_func(), ptrace_wrap_instance_stop(), rz_th_sem_post(), th_run(), and uv__sem_post().
int sem_trywait | ( | UV_PLATFORM_SEM_T * | semid | ) |
Definition at line 577 of file os390-syscalls.c.
References UNREACHABLE.
Referenced by uv__sem_trywait().
int sem_wait | ( | UV_PLATFORM_SEM_T * | semid | ) |
Definition at line 582 of file os390-syscalls.c.
References UNREACHABLE.
Referenced by ptrace_wrap(), ptrace_wrap_fork(), ptrace_wrap_func(), rz_th_sem_wait(), th_run(), and uv__sem_wait().
Definition at line 553 of file os390-syscalls.c.
References maxlen, NULL, p, and cmd_descs_generate::str.
Referenced by rz_str_nlen(), and uv_if_indextoname().
|
static |
Definition at line 37 of file os390-syscalls.c.
Referenced by after_fork(), before_fork(), child_fork(), epoll_create1(), epoll_ctl(), epoll_file_close(), epoll_init(), and epoll_queue_close().
|
static |
Definition at line 36 of file os390-syscalls.c.
Referenced by child_fork(), epoll_create1(), epoll_file_close(), and epoll_init().
|
static |
Definition at line 38 of file os390-syscalls.c.
Referenced by child_fork(), epoll_create1(), and epoll_file_close().