Skip to content

ppoll

Implemented in Antinomie 0.7.0 · Syscall list

long ppoll(struct pollfd *ufds, unsigned int nfds, struct __kernel_timespec *tsp, const sigset_t *sigmask, size_t sigsetsize);
Number (x86-64) 271
ABI common
Kernel entry point sys_ppoll

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

Like poll with a nanosecond timeout and an atomic signal mask.

Name Type Meaning
ufds (arg0) struct pollfd * Pointer to an array of pollfd structures.
nfds (arg1) unsigned int Number of entries in the array.
tsp (arg2) struct __kernel_timespec * Pointer to a time structure.
sigmask (arg3) const sigset_t * Pointer to the signal mask to apply.
sigsetsize (arg4) size_t Size in bytes of the signal set; must be sizeof(sigset_t), 8.

On success: the number of descriptors with events, 0 on timeout.

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
-14 EFAULT A pointer argument points outside the accessible address space.
-4 EINTR The call was interrupted by a signal.

ppoll(2) on man7.org

Coverage mark: Implemented. Every pointer argument has a capture rule in the pinned kernel patch and none of them records a “no decoder”, “address only” or “not observed” gap on any code path. Individual values can still be incomplete on a particular call; see the capture statuses.

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
ufds (arg0) Entry the pointer itself, as a raw word args.0, args.raw[0]
↳ pointee Entry and exit array of pollfd, count from nfds (arg1) arg0.pollfd at exit when the result is 0 or greater, or the call was interrupted
nfds (arg1) Entry raw scalar word args.1, args.nfds
tsp (arg2) Entry the pointer itself, as a raw word args.2, args.raw[2]
↳ pointee Entry structure timespec (16 bytes) arg2.timeout always
↳ pointee Exit structure timespec, the time left arg2.timeout.observed result is 0 or greater, or the call was interrupted
sigmask (arg3) Entry the pointer itself, as a raw word args.3, args.raw[3]
↳ pointee Entry signal set, size from sigsetsize (arg4) signal.mask the pointer is not NULL
sigsetsize (arg4) Entry raw scalar word args.4, args.sigsetsize
  • Result: ret, syscall.errno, syscall.success, syscall.duration_ns.
  • Argument words: args.ufds (arg0), args.nfds (arg1), args.tsp (arg2), args.sigmask (arg3), args.sigsetsize (arg4); args.0 to args.5 by position.
  • Structure pollfd[] behind ufds (arg0): args.ufds.<member> for events, fd, revents.
  • Structure timespec[2] behind tsp (arg2): args.tsp.<member> for tv_nsec, tv_sec.

See Syscall Trace filter for the full syntax.

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