utrace_barrier — synchronize with simultaneous tracing callbacks
int utrace_barrier ( | struct task_struct * target, |
struct utrace_attached_engine * engine); |
This blocks while target might be in the midst of making a callback to
engine. It can be interrupted by signals and will return -ERESTARTSYS.
A return value of zero means no callback from target to engine was
in progress.
It's not necessary to keep the target pointer alive for this call.
It's only necessary to hold a ref on engine. This will return
safely even if target has been reaped and has no task refs.
A successful return from utrace_barrier guarantees its ordering
with respect to utrace_set_events and utrace_control calls. If
target was not properly stopped, event callbacks just disabled might
still be in progress; utrace_barrier waits until there is no chance
an unwanted callback can be in progress.