23 #include <sys/ioctl.h>
31 #if defined(__clang__)
34 #include "//'SYS1.SAMPLIB(CSRSIC)'"
39 #define CSD_OFFSET 0x294
50 #define RCTLACS_OFFSET 0xC4
53 #define CSD_NUMBER_ONLINE_CPUS 0xD4
56 #define CVTOPCTP_OFFSET 0x25C
59 #define RMCTRCT_OFFSET 0xE4
62 #define CVTRCEP_OFFSET 0x490
68 #define RCEPOOL_OFFSET 0x004
71 #define RCEAFC_OFFSET 0x088
74 #define CPCMODEL_LENGTH 16
80 #define ASCBRSME 0x16C
89 #define PGTH_CURRENT 1
91 #define PGTHAPATH 0x20
92 #pragma linkage(BPX4GTH, OS)
93 #pragma linkage(BPX1GTH, OS)
140 unsigned long long timestamp;
181 struct Output_path_type {
190 void* Output_address;
191 struct Output_path_type* Output_path;
197 Output_length =
sizeof(Output_buf);
198 Output_address = &Output_buf;
199 Input_address = &Input_data;
200 memset(&Input_data, 0,
sizeof Input_data);
202 Input_data.pid =
pid;
206 BPX4GTH(&Input_length,
214 BPX1GTH(&Input_length,
229 assert(((Output_buf.Output_data.offsetPath >>24) & 0xFF) ==
'A');
232 Output_path = (
struct Output_path_type*) ((
char*) (&Output_buf) +
233 (Output_buf.Output_data.offsetPath & 0x00FFFFFF));
235 if (Output_path->len >=
len) {
309 *rss = nframes * sysconf(_SC_PAGESIZE);
319 u.ut_type = BOOT_TIME;
323 *uptime = difftime64(time64(&t),
v->ut_tv.tv_sec);
351 cpu_info = *cpu_infos;
354 cpu_info->
speed = *(
int*)(
info.siv1v2si22v1.si22v1cpucapability);
377 __net_ifconf6header_t ifc;
378 __net_ifconf6entry_t* ifr;
379 __net_ifconf6entry_t*
p;
380 __net_ifconf6entry_t flg;
389 ifc.__nif6h_version = 1;
390 ifc.__nif6h_buflen = maxsize;
400 ifr = (__net_ifconf6entry_t*)(ifc.__nif6h_buffer);
401 while ((
char*)ifr < (
char*)ifc.__nif6h_buffer + ifc.__nif6h_buflen) {
403 ifr = (__net_ifconf6entry_t*)((
char*)ifr + ifc.__nif6h_entrylen);
405 if (!(
p->__nif6e_addr.sin6_family ==
AF_INET6 ||
406 p->__nif6e_addr.sin6_family ==
AF_INET))
409 if (!(
p->__nif6e_flags & _NIF6E_FLAGS_ON_LINK_ACTIVE))
421 address = *addresses;
423 ifr = (__net_ifconf6entry_t*)(ifc.__nif6h_buffer);
424 while ((
char*)ifr < (
char*)ifc.__nif6h_buffer + ifc.__nif6h_buflen) {
426 ifr = (__net_ifconf6entry_t*)((
char*)ifr + ifc.__nif6h_entrylen);
428 if (!(
p->__nif6e_addr.sin6_family ==
AF_INET6 ||
429 p->__nif6e_addr.sin6_family ==
AF_INET))
432 if (!(
p->__nif6e_flags & _NIF6E_FLAGS_ON_LINK_ACTIVE))
439 if (
p->__nif6e_addr.sin6_family ==
AF_INET6)
446 address->
is_internal = flg.__nif6e_flags & _NIF6E_FLAGS_LOOPBACK ? 1 : 0;
483 ifc.ifc_len = maxsize;
489 #define MAX(a,b) (((a)>(b))?(a):(b))
490 #define ADDR_SIZE(p) MAX((p).sa_len, sizeof(p))
494 while ((
char*)ifr < (
char*)ifc.ifc_req + ifc.ifc_len) {
496 ifr = (
struct ifreq*)
497 ((
char*)ifr +
sizeof(ifr->ifr_name) +
ADDR_SIZE(ifr->ifr_addr));
499 if (!(
p->ifr_addr.sa_family ==
AF_INET6 ||
503 memcpy(flg.ifr_name,
p->ifr_name,
sizeof(flg.ifr_name));
509 if (!(flg.ifr_flags & IFF_UP && flg.ifr_flags & IFF_RUNNING))
528 address = *addresses;
537 while ((
char*)ifr < (
char*)ifc.ifc_req + ifc.ifc_len) {
539 ifr = (
struct ifreq*)
540 ((
char*)ifr +
sizeof(ifr->ifr_name) +
ADDR_SIZE(ifr->ifr_addr));
542 if (!(
p->ifr_addr.sa_family ==
AF_INET6 ||
546 memcpy(flg.ifr_name,
p->ifr_name,
sizeof(flg.ifr_name));
552 if (!(flg.ifr_flags & IFF_UP && flg.ifr_flags & IFF_RUNNING))
565 address->
is_internal = flg.ifr_flags & IFF_LOOPBACK ? 1 : 0;
615 p[0].events = POLLIN;
619 while (rv == -1 && errno ==
EINTR);
624 if (
p[0].revents & POLLNVAL)
655 reg_struct.__rfis_cmd = _RFIS_REG;
657 reg_struct.__rfis_type = 1;
664 rc = __w_pioctl(
path, _IOCC_REGFILEINT,
sizeof(reg_struct), ®_struct);
672 sizeof(
handle->rfis_rftok));
689 reg_struct.__rfis_cmd = _RFIS_UNREG;
691 reg_struct.__rfis_type = 1;
693 sizeof(
handle->rfis_rftok));
700 rc = __w_pioctl(
"/", _IOCC_REGFILEINT,
sizeof(reg_struct), ®_struct);
721 if (msglen == -1 && errno == ENOMSG)
728 if (
msg.__rfim_event == _RFIM_ATTR ||
msg.__rfim_event == _RFIM_WRITE)
730 else if (
msg.__rfim_event == _RFIM_RENAME)
743 static const int max_safe_timeout = 1789569;
760 if (
loop->nfds == 0) {
780 e.events =
w->pevents;
802 w->events =
w->pevents;
827 if (
sizeof(
int32_t) ==
sizeof(
long) &&
timeout >= max_safe_timeout)
842 if (reset_timeout != 0) {
864 if (reset_timeout != 0) {
898 assert((
unsigned) fd < loop->nwatchers);
917 pe->
events &=
w->pevents | POLLERR | POLLHUP;
920 pe->
events |=
w->pevents & (POLLIN | POLLOUT);
931 if (reset_timeout != 0) {
954 real_timeout -= (
loop->time - base);
955 if (real_timeout <= 0)
static mcore_handle handle
RzBinInfo * info(RzBinFile *bf)
static static fork const void static count static fd const char const char static newpath const char static path const char path
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd static protocol static who struct sockaddr static addrlen static backlog struct timeval struct timezone static tz const struct iovec static count static mode const void const struct sockaddr static tolen const char static pathname void count
static static sync static getppid static getegid const char static filename char static len const char char static bufsiz static mask static vfork const void static prot static getpgrp const char static swapflags static arg static fd socket
static static sync static getppid static getegid const char static filename ioctl
return memset(p, 0, total)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
static static fork const void static count static fd const char const char static newpath char char char static envp time_t static t const char static mode static whence const char static dir time_t static t unsigned static seconds const char struct utimbuf static buf static inc pid
static const char struct stat static buf struct stat static buf static vhangup int struct rusage static rusage struct sysinfo static info unsigned static __unused struct utsname static buf const char static size const char static name static pid unsigned static persona static fsgid const void static flags const struct iovec static count static fd const void static len static munlockall struct sched_param static p static sched_yield static policy const struct timespec struct timespec static rem uid_t uid_t uid_t static suid poll
static const char struct stat static buf struct stat static buf static vhangup int struct rusage static rusage struct sysinfo static info unsigned static __unused struct utsname static buf const char static size const char static name static pid unsigned static persona static fsgid const void static flags const struct iovec static count static fd const void static len static munlockall struct sched_param static p static sched_yield static policy const struct timespec struct timespec static rem uid_t uid_t uid_t static suid struct pollfd unsigned nfds
assert(limit<=UINT32_MAX/2)
void epoll_queue_close(uv__os390_epoll *lst)
int epoll_wait(uv__os390_epoll *lst, struct epoll_event *events, int maxevents, int timeout)
int epoll_ctl(uv__os390_epoll *lst, int op, int fd, struct epoll_event *event)
uv__os390_epoll * epoll_create1(int flags)
unsigned data_area_ptr_assign_type
static int getexe(const int pid, char *buf, size_t len)
uint64_t uv_get_total_memory(void)
void uv__fs_event_close(uv_fs_event_t *handle)
void uv_loadavg(double avg[3])
static int uv__interface_addresses_v6(uv_interface_address_t **addresses, int *count)
void uv__set_process_title(const char *title)
int uv_fs_event_stop(uv_fs_event_t *handle)
void uv__platform_invalidate_fd(uv_loop_t *loop, int fd)
uint64_t uv_get_free_memory(void)
int uv_interface_addresses(uv_interface_address_t **addresses, int *count)
#define CSD_NUMBER_ONLINE_CPUS
void uv__io_poll(uv_loop_t *loop, int timeout)
uint64_t uv__hrtime(uv_clocktype_t type)
int uv__io_check_fd(uv_loop_t *loop, int fd)
static int os390_message_queue_handler(uv__os390_epoll *ep)
int uv__platform_loop_init(uv_loop_t *loop)
int uv_fs_event_start(uv_fs_event_t *handle, uv_fs_event_cb cb, const char *filename, unsigned int flags)
int uv_uptime(double *uptime)
void uv_free_interface_addresses(uv_interface_address_t *addresses, int count)
int uv__io_fork(uv_loop_t *loop)
int uv_fs_event_init(uv_loop_t *loop, uv_fs_event_t *handle)
int uv_cpu_info(uv_cpu_info_t **cpu_infos, int *count)
uint64_t uv_get_constrained_memory(void)
void uv__platform_loop_delete(uv_loop_t *loop)
int uv_exepath(char *buffer, size_t *size)
int uv_resident_set_memory(size_t *rss)
#define QUEUE_DATA(ptr, type, field)
#define container_of(ptr, type, member)
static struct sockaddr static addrlen static backlog const void static flags void flags
static struct sockaddr static addrlen static backlog const void msg
_W64 unsigned int uintptr_t
ssize_t uv__strscpy(char *d, const char *s, size_t n)
struct uv_cpu_times_s cpu_times
struct sockaddr_in6 address6
union uv_interface_address_s::@398 address
struct sockaddr_in address4
int uv__search_path(const char *prog, char *buf, size_t *buflen)
#define SAVE_ERRNO(block)
data_area_ptr_assign_type assign
char * uv__strdup(const char *s)
void * uv__malloc(size_t size)
void * uv__calloc(size_t count, size_t size)
void uv__metrics_update_idle_time(uv_loop_t *loop)
void uv__metrics_set_provider_entry_time(uv_loop_t *loop)
#define uv__handle_init(loop_, h, type_)
#define uv__handle_stop(h)
#define uv__get_internal_fields(loop)
#define uv__handle_start(h)
void(* uv_fs_event_cb)(uv_fs_event_t *handle, const char *filename, int events, int status)
static const z80_opcode fd[]