1UTRACE_BARRIER(9) utrace core API UTRACE_BARRIER(9)
2
3
4
6 utrace_barrier - synchronize with simultaneous tracing callbacks
7
9 int utrace_barrier(struct task_struct * target,
10 struct utrace_engine * engine);
11
13 target
14 thread to affect
15
16 engine
17 engine to affect (can be detached)
18
20 This blocks while target might be in the midst of making a callback to
21 engine. It can be interrupted by signals and will return -ERESTARTSYS.
22 A return value of zero means no callback from target to engine was in
23 progress. Any effect of its return value (such as UTRACE_STOP) has
24 already been applied to engine.
25
26 It's not necessary to keep the target pointer alive for this call. It's
27 only necessary to hold a ref on engine. This will return safely even if
28 target has been reaped and has no task refs.
29
30 A successful return from utrace_barrier guarantees its ordering with
31 respect to utrace_set_events and utrace_control calls. If target was
32 not properly stopped, event callbacks just disabled might still be in
33 progress; utrace_barrier waits until there is no chance an unwanted
34 callback can be in progress.
35
36
37
38Kernel Hackers Manual 2.6. November 2011 UTRACE_BARRIER(9)