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);
69 int sem_destroy(UV_PLATFORM_SEM_T* semid);
70 int sem_post(UV_PLATFORM_SEM_T* semid);
71 int sem_trywait(UV_PLATFORM_SEM_T* semid);
72 int sem_wait(UV_PLATFORM_SEM_T* semid);
73 
74 #endif /* UV_OS390_SYSCALL_H_ */
xds_interop_client.str
str
Definition: xds_interop_client.py:487
sem_init
int sem_init(UV_PLATFORM_SEM_T *semid, int pshared, unsigned int value)
Definition: os390-syscalls.c:563
strnlen
size_t strnlen(const char *str, size_t maxlen)
Definition: os390-syscalls.c:554
epoll_file_close
int epoll_file_close(int fd)
Definition: os390-syscalls.c:354
uv__os390_epoll::size
unsigned long size
Definition: os390-syscalls.h:49
os390_readlink
ssize_t os390_readlink(const char *path, char *buf, size_t len)
Definition: os390-syscalls.c:485
buf
voidpf void * buf
Definition: bloaty/third_party/zlib/contrib/minizip/ioapi.h:136
epoll_event::is_msg
int is_msg
Definition: os390-syscalls.h:43
uv__os390_epoll
Definition: os390-syscalls.h:46
check_documentation.path
path
Definition: check_documentation.py:57
sem_trywait
int sem_trywait(UV_PLATFORM_SEM_T *semid)
Definition: os390-syscalls.c:578
sem_destroy
int sem_destroy(UV_PLATFORM_SEM_T *semid)
Definition: os390-syscalls.c:568
scandir
int scandir(const char *maindir, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **))
Definition: os390-syscalls.c:41
ssize_t
intptr_t ssize_t
Definition: win.h:27
req
static uv_connect_t req
Definition: test-connection-fail.c:30
epoll_event::fd
int fd
Definition: os390-syscalls.h:42
uv__os390_epoll::member
QUEUE member
Definition: os390-syscalls.h:47
value
const char * value
Definition: hpack_parser_table.cc:165
uv.h
mkdtemp
char * mkdtemp(char *path)
Definition: os390-syscalls.c:425
internal.h
absl::flags_internal
Definition: abseil-cpp/absl/flags/commandlineflag.h:40
poll.h
epoll_event
Definition: os390-syscalls.h:40
uv__os390_epoll::msg_queue
int msg_queue
Definition: os390-syscalls.h:50
uv__os390_epoll::items
struct pollfd * items
Definition: os390-syscalls.h:48
epoll_event::events
int events
Definition: os390-syscalls.h:41
len
int len
Definition: abseil-cpp/absl/base/internal/low_level_alloc_test.cc:46
sem_post
int sem_post(UV_PLATFORM_SEM_T *semid)
Definition: os390-syscalls.c:573
epoll_create1
uv__os390_epoll * epoll_create1(int flags)
Definition: os390-syscalls.c:215
epoll_wait
int epoll_wait(uv__os390_epoll *ep, struct epoll_event *events, int maxevents, int timeout)
Definition: os390-syscalls.c:284
op
static grpc_op * op
Definition: test/core/fling/client.cc:47
UV_PLATFORM_SEM_T
#define UV_PLATFORM_SEM_T
Definition: os390.h:25
timeout
uv_timer_t timeout
Definition: libuv/docs/code/uvwget/main.c:9
epoll_ctl
int epoll_ctl(uv__os390_epoll *ep, int op, int fd, struct epoll_event *event)
Definition: os390-syscalls.c:238
sem_wait
int sem_wait(UV_PLATFORM_SEM_T *semid)
Definition: os390-syscalls.c:583
QUEUE
void * QUEUE[2]
Definition: queue.h:21
nanosleep
int nanosleep(const struct timespec *req, struct timespec *rem)
Definition: os390-syscalls.c:385


grpc
Author(s):
autogenerated on Fri May 16 2025 02:59:36