3 #ifdef HAVE_SYS_EPOLL_H
4 # include <sys/epoll.h>
9 tprintf("%d", (int) tcp->u_arg[0]);
11 return RVAL_DECODED | RVAL_FD;
14 #include "xlat/epollflags.h"
16 SYS_FUNC(epoll_create1)
18 printflags(epollflags, tcp->u_arg[0], "EPOLL_???");
20 return RVAL_DECODED | RVAL_FD;
23 #ifdef HAVE_SYS_EPOLL_H
24 # include "xlat/epollevents.h"
27 print_epoll_event(struct epoll_event *ev)
30 printflags(epollevents, ev->events, "EPOLL???");
31 /* We cannot know what format the program uses, so print u32 and u64
32 which will cover every value. */
33 tprintf(", {u32=%" PRIu32 ", u64=%" PRIu64 "}}",
34 ev->data.u32, ev->data.u64);
38 #include "xlat/epollctls.h"
42 struct epoll_event ev;
44 printfd(tcp, tcp->u_arg[0]);
46 printxval(epollctls, tcp->u_arg[1], "EPOLL_CTL_???");
48 printfd(tcp, tcp->u_arg[2]);
50 #ifdef HAVE_SYS_EPOLL_H
51 if (EPOLL_CTL_DEL == tcp->u_arg[1])
52 printaddr(tcp->u_arg[3]);
53 else if (!umove_or_printaddr(tcp, tcp->u_arg[3], &ev))
54 print_epoll_event(&ev);
56 printaddr(tcp->u_arg[3]);
63 print_epoll_event_array(struct tcb *tcp, const long addr, const long len)
65 #ifdef HAVE_SYS_EPOLL_H
66 struct epoll_event ev, *start, *cur, *end;
73 if (umove_or_printaddr(tcp, addr, &ev))
77 print_epoll_event(&ev);
79 start = (struct epoll_event *) addr;
81 for (cur = start + 1; cur < end; ++cur) {
83 if (umove_or_printaddr(tcp, (long) cur, &ev))
85 print_epoll_event(&ev);
94 epoll_wait_common(struct tcb *tcp)
97 printfd(tcp, tcp->u_arg[0]);
100 print_epoll_event_array(tcp, tcp->u_arg[1], tcp->u_rval);
101 tprintf(", %d, %d", (int) tcp->u_arg[2], (int) tcp->u_arg[3]);
107 epoll_wait_common(tcp);
111 SYS_FUNC(epoll_pwait)
113 epoll_wait_common(tcp);
116 /* NB: kernel requires arg[5] == NSIG / 8 */
117 print_sigset_addr_len(tcp, tcp->u_arg[4], tcp->u_arg[5]);
118 tprintf(", %lu", tcp->u_arg[5]);