1UTRACE_ATTACH_TASK(9)           utrace core API          UTRACE_ATTACH_TASK(9)
2
3
4

NAME

6       utrace_attach_task - attach new engine, or look up an attached engine
7

SYNOPSIS

9       struct utrace_engine * utrace_attach_task(struct task_struct * target,
10                                                 int flags,
11                                                 const struct utrace_engine_ops * ops,
12                                                 void * data);
13

ARGUMENTS

15       target
16           thread to attach to
17
18       flags
19           flag bits combined with OR, see below
20
21       ops
22           callback table for new engine
23
24       data
25           engine private data pointer
26

DESCRIPTION

28       The caller must ensure that the target thread does not get freed, i.e.
29       hold a ref or be its parent. It is always safe to call this on current,
30       or on the child pointer in a report_clone callback. For most other
31       cases, it´s easier to use utrace_attach_pid instead.
32

UTRACE_ATTACH_CREATE

34       Create a new engine. If UTRACE_ATTACH_CREATE is not specified, you only
35       look up an existing engine already attached to the thread.
36

UTRACE_ATTACH_EXCLUSIVE

38       Attempting to attach a second (matching) engine fails with -EEXIST.
39

UTRACE_ATTACH_MATCH_OPS

41       Only consider engines matching ops.
42

UTRACE_ATTACH_MATCH_DATA

44       Only consider engines matching data.
45
46       Calls with neither UTRACE_ATTACH_MATCH_OPS nor UTRACE_ATTACH_MATCH_DATA
47       match the first among any engines attached to target. That means that
48       UTRACE_ATTACH_EXCLUSIVE in such a call fails with -EEXIST if there are
49       any engines on target at all.
50
51
52
53Kernel Hackers Manual 2.6.         June 2019             UTRACE_ATTACH_TASK(9)
Impressum