blob: 0e22c2b747d138a2e74c4412dc6efe76abcdceee [file] [log] [blame]
Dmitry V. Levin28471d12015-08-01 20:36:53 +00001#include "defs.h"
2
3static int
4do_eventfd(struct tcb *tcp, int flags_arg)
5{
Dmitry V. Levin00cc3502015-08-01 20:43:51 +00006 tprintf("%u", (unsigned int) tcp->u_arg[0]);
Dmitry V. Levin28471d12015-08-01 20:36:53 +00007 if (flags_arg >= 0) {
8 tprints(", ");
9 printflags(open_mode_flags, tcp->u_arg[flags_arg], "O_???");
10 }
11
Dmitry V. Levinede0c482015-08-01 20:39:48 +000012 return RVAL_DECODED | RVAL_FD;
Dmitry V. Levin28471d12015-08-01 20:36:53 +000013}
14
15SYS_FUNC(eventfd)
16{
17 return do_eventfd(tcp, -1);
18}
19
20SYS_FUNC(eventfd2)
21{
22 return do_eventfd(tcp, 1);
23}