Rizin
unix-like reverse engineering framework and cli tools
os390-syscalls.h
Go to the documentation of this file.
1 /* Copyright libuv project contributors. All rights reserved.
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining a copy
4  * of this software and associated documentation files (the "Software"), to
5  * deal in the Software without restriction, including without limitation the
6  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7  * sell copies of the Software, and to permit persons to whom the Software is
8  * furnished to do so, subject to the following conditions:
9  *
10  * The above copyright notice and this permission notice shall be included in
11  * all copies or substantial portions of the Software.
12  *
13  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
18  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
19  * IN THE SOFTWARE.
20  */
21 
22 
23 #ifndef UV_OS390_SYSCALL_H_
24 #define UV_OS390_SYSCALL_H_
25 
26 #include "uv.h"
27 #include "internal.h"
28 #include <dirent.h>
29 #include <poll.h>
30 #include <pthread.h>
31 
32 #define EPOLL_CTL_ADD 1
33 #define EPOLL_CTL_DEL 2
34 #define EPOLL_CTL_MOD 3
35 #define MAX_EPOLL_INSTANCES 256
36 #define MAX_ITEMS_PER_EPOLL 1024
37 
38 #define UV__O_CLOEXEC 0x80000
39 
40 struct epoll_event {
41  int events;
42  int fd;
43  int is_msg;
44 };
45 
46 typedef struct {
48  struct pollfd* items;
49  unsigned long size;
50  int msg_queue;
52 
53 /* epoll api */
55 int epoll_ctl(uv__os390_epoll* ep, int op, int fd, struct epoll_event *event);
56 int epoll_wait(uv__os390_epoll* ep, struct epoll_event *events, int maxevents, int timeout);
57 int epoll_file_close(int fd);
58 
59 /* utility functions */
60 int nanosleep(const struct timespec* req, struct timespec* rem);
61 int scandir(const char* maindir, struct dirent*** namelist,
62  int (*filter)(const struct dirent *),
63  int (*compar)(const struct dirent **,
64  const struct dirent **));
65 char *mkdtemp(char* path);
66 ssize_t os390_readlink(const char* path, char* buf, size_t len);
67 size_t strnlen(const char* str, size_t maxlen);
68 int sem_init(UV_PLATFORM_SEM_T* semid, int pshared, unsigned int value);
73 
74 #endif /* UV_OS390_SYSCALL_H_ */
size_t len
Definition: 6502dis.c:15
static int value
Definition: cmd_api.c:93
static static fork const void static count static fd const char const char static newpath const char static path const char path
Definition: sflib.h:35
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 static offset struct stat static buf void long static basep static whence static length const void static len static semflg const void static shmflg const struct timespec req
Definition: sflib.h:128
voidpf void * buf
Definition: ioapi.h:138
static void struct sockaddr socklen_t static fromlen static backlog static fork char char char static envp int struct rusage static rusage struct utsname static buf semid
Definition: sflib.h:97
int sem_wait(UV_PLATFORM_SEM_T *semid)
int nanosleep(const struct timespec *req, struct timespec *rem)
int sem_destroy(UV_PLATFORM_SEM_T *semid)
int epoll_wait(uv__os390_epoll *ep, struct epoll_event *events, int maxevents, int timeout)
int sem_trywait(UV_PLATFORM_SEM_T *semid)
int sem_post(UV_PLATFORM_SEM_T *semid)
ssize_t os390_readlink(const char *path, char *buf, size_t len)
int epoll_file_close(int fd)
int scandir(const char *maindir, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **))
int epoll_ctl(uv__os390_epoll *ep, int op, int fd, struct epoll_event *event)
int sem_init(UV_PLATFORM_SEM_T *semid, int pshared, unsigned int value)
size_t strnlen(const char *str, size_t maxlen)
uv__os390_epoll * epoll_create1(int flags)
char * mkdtemp(char *path)
#define UV_PLATFORM_SEM_T
Definition: os390.h:25
void * QUEUE[2]
Definition: queue.h:21
static struct sockaddr static addrlen static backlog const void static flags void flags
Definition: sfsocketcall.h:123
int ssize_t
Definition: sftypes.h:39
Definition: sftypes.h:48
Definition: sftypes.h:75
struct pollfd * items
unsigned long size
uv_timer_t timeout
Definition: main.c:9
ut64 maxlen
Definition: core.c:76
Definition: dis.c:32
static const z80_opcode fd[]
Definition: z80_tab.h:997