1STRUCT USER_REGSET(9)            Machine State           STRUCT USER_REGSET(9)
2
3
4

NAME

6       struct_user_regset - accessible thread CPU state
7

SYNOPSIS

9       struct user_regset {
10         user_regset_get_fn * get;
11         user_regset_set_fn * set;
12         user_regset_active_fn * active;
13         user_regset_writeback_fn * writeback;
14         unsigned int n;
15         unsigned int size;
16         unsigned int align;
17         unsigned int bias;
18         unsigned int core_note_type;
19       };
20

MEMBERS

22       get
23           Function to fetch values.
24
25       set
26           Function to store values.
27
28       active
29           Function to report if regset is active, or NULL.
30
31       writeback
32           Function to write data back to user memory, or NULL.
33
34       n
35           Number of slots (registers).
36
37       size
38           Size in bytes of a slot (register).
39
40       align
41           Required alignment, in bytes.
42
43       bias
44           Bias from natural indexing.
45
46       core_note_type
47           ELF note n_type value used in core dumps.
48

DESCRIPTION

50       This data structure describes a machine resource we call a register
51       set. This is part of the state of an individual thread, not necessarily
52       actual CPU registers per se. A register set consists of a number of
53       similar slots, given by n. Each slot is size bytes, and aligned to
54       align bytes (which is at least size).
55
56       These functions must be called only on the current thread or on a
57       thread that is in TASK_STOPPED or TASK_TRACED state, that we are
58       guaranteed will not be woken up and return to user mode, and that we
59       have called wait_task_inactive on. (The target thread always might wake
60       up for SIGKILL while these functions are working, in which case that
61       thread's user_regset state might be scrambled.)
62
63       The pos argument must be aligned according to align; the count argument
64       must be a multiple of size. These functions are not responsible for
65       checking for invalid arguments.
66
67       When there is a natural value to use as an index, bias gives the
68       difference between the natural index and the slot index for the
69       register set. For example, x86 GDT segment descriptors form a regset;
70       the segment selector produces a natural index, but only a subset of
71       that index space is available as a regset (the TLS slots); subtracting
72       bias from a segment selector index value computes the regset slot.
73
74       If nonzero, core_note_type gives the n_type field (NT_* value) of the
75       core file note in which this regset's data appears. NT_PRSTATUS is a
76       special case in that the regset data starts at offsetof(struct
77       elf_prstatus, pr_reg) into the note data; that is part of the
78       per-machine ELF formats userland knows about. In other cases, the core
79       file note contains exactly the whole regset (n * size) and nothing
80       else. The core file note is normally omitted when there is an active
81       function and it returns zero.
82
83
84
85Kernel Hackers Manual 2.6.       November 2011           STRUCT USER_REGSET(9)
Impressum