fn wait_syscall_consumed(r: &Req<'_>, cpu_before: Option<u64>)Expand description
Waits until the continued syscall has consumed its rewritten argument.
The kernel copies a path in, and walks it, as the first thing it does
after the task resumes, so the string may be restored once the task has
spent SETTLED_CPU of CPU time since the reply (/proc/<tid>/schedstat),
or sooner when it is seen blocked in a different syscall, or outside any
syscall, or gone. /proc/<tid>/syscall alone cannot tell: it reads
running for a task on a CPU whether it is about to copy the argument or
long past it. A syscall that blocks inside itself has consumed the
argument too, so the wait gives up after RESTORE_TIMEOUT. Without
scheduler statistics the wait is a fixed two milliseconds.
§Arguments
r- The notification, for the thread id and the syscall to look for.cpu_before- The task’s run time before the reply, fromcpu_time.