utrace_attach_task — attach new engine, or look up an attached engine
struct utrace_engine * utrace_attach_task ( | struct task_struct * target, |
| int flags, | |
| const struct utrace_engine_ops * ops, | |
void * data); |
targetthread to attach to
flagsflag bits combined with OR, see below
opscallback table for new engine
dataengine private data pointer
The caller must ensure that the target thread does not get freed,
i.e. hold a ref or be its parent. It is always safe to call this
on current, or on the child pointer in a report_clone callback.
For most other cases, it's easier to use utrace_attach_pid instead.
Create a new engine. If UTRACE_ATTACH_CREATE is not specified, you
only look up an existing engine already attached to the thread.
Only consider engines matching data.
Calls with neither UTRACE_ATTACH_MATCH_OPS nor UTRACE_ATTACH_MATCH_DATA
match the first among any engines attached to target. That means that
UTRACE_ATTACH_EXCLUSIVE in such a call fails with -EEXIST if there
are any engines on target at all.