Skip to content

epoll_ctl

Partial in Antinomie 0.7.0 · Syscall list

long epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
Number (x86-64) 233
ABI common
Kernel entry point sys_epoll_ctl

This is the raw kernel prototype from the pinned Linux 6.12.94 schema, not the libc wrapper.

Adds, changes or removes a file descriptor in an epoll instance, with the events of interest.

Name Type Meaning
epfd (arg0) int File descriptor of an epoll instance.
op (arg1) int Operation selector.
fd (arg2) int File descriptor to operate on.
event (arg3) struct epoll_event * Pointer to an event structure.

On success: 0.

In an Antinomie trace the Return column and the ret filter field show the raw kernel return value. On failure that is the negative errno, for example -2 for ENOENT, not the -1 plus errno that the libc wrapper gives. syscall.errno holds the positive errno and syscall.success is false.

Raw return Name Meaning
-9 EBADF A file descriptor is not valid for this operation.
-17 EEXIST The object already exists.
-2 ENOENT A path component or the named object does not exist.

epoll_ctl(2) on man7.org

Coverage mark: Partial. The epoll_event is decoded for EPOLL_CTL_ADD and EPOLL_CTL_MOD. Any other operation (except EPOLL_CTL_DEL, which has none) records it with the “no decoder” status.

Every call is recorded as an Entry record (the six argument words and the pointees copied at entry) and an Exit record (the return value and the pointees copied at exit).

Argument When How Recorded field key Condition
epfd (arg0) Entry raw scalar word args.0, args.epfd
op (arg1) Entry raw scalar word args.1, args.op
fd (arg2) Entry raw scalar word args.2, args.fd
event (arg3) Entry the pointer itself, as a raw word args.3, args.raw[3]
↳ pointee Entry structure epoll_event (12 bytes) arg3.epoll_event op is not EPOLL_CTL_DEL; status “no decoder” if op is not ADD or MOD
  • Result: ret, syscall.errno, syscall.success, syscall.duration_ns.
  • Argument words: args.epfd (arg0), args.op (arg1), args.fd (arg2), args.event (arg3); args.0 to args.5 by position.
  • Structure epoll_event[] behind event (arg3): args.event.<member> for data, events.

See Syscall Trace filter for the full syntax.

  • An op other than ADD, MOD or DEL records the event pointer with the “no decoder” status.
  • See the coverage mark above for the code paths that record a gap.

For what the capture statuses mean, see Capture statuses. For what is never recorded, see Known gaps.