Print this page
8158 Want named threads API
9857 proc manpages should have LIBRARY section
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man3proc/Plwp_getxregs.3proc
+++ new/usr/src/man/man3proc/Plwp_getxregs.3proc
1 1 .\"
2 2 .\" This file and its contents are supplied under the terms of the
3 3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 4 .\" You may only use this file in accordance with the terms of version
5 5 .\" 1.0 of the CDDL.
6 6 .\"
7 7 .\" A full copy of the text of the CDDL should have accompanied this
8 8 .\" source. A copy of the CDDL is also available via the Internet at
9 9 .\" http://www.illumos.org/license/CDDL.
10 10 .\"
↓ open down ↓ |
10 lines elided |
↑ open up ↑ |
11 11 .\"
12 12 .\" Copyright 2015 Joyent, Inc.
13 13 .\"
14 14 .Dd May 11, 2016
15 15 .Dt PLWP_GETXREGS 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Plwp_getxregs ,
19 19 .Nm Plwp_setxregs
20 20 .Nd get and set extended register state
21 -.Sh SYNOPSIS
21 +.Sh LIBRARY
22 22 .Lb libproc
23 +.Sh SYNOPSIS
23 24 .In libproc.h
24 25 .Ft int
25 26 .Fo Plwp_getxregs
26 27 .Fa "struct ps_prochandle *P"
27 28 .Fa "lwpid_t lwpid"
28 29 .Fa "prxregset_t *xregs"
29 30 .Fc
30 31 .Ft int
31 32 .Fo Plwp_setxregs
32 33 .Fa "struct ps_prochandle *P"
33 34 .Fa "lwpid_t lwpid"
34 35 .Fa "const prxregset_t *xregs"
35 36 .Fc
36 37 .Sh DESCRIPTION
37 38 The
38 39 .Fn Plwp_getxregs
39 40 and
40 41 .Fn Plwp_setxregs
41 42 functions get and set the extended register state of the thread
42 43 .Fa lwpid
43 44 in the process handle
44 45 .Fa P .
45 46 .Pp
46 47 The extended register state is defined by the architecture.
47 48 These registers may refer to optional registers that have become common on the
48 49 platform, but are not part of the standard ABI and thus not covered by
49 50 functions such as
50 51 .Xr Plwp_getregs 3PROC
51 52 and
52 53 .Xr Plwp_getfpregs 3PROC .
53 54 .Pp
54 55 The
55 56 .Fn Plwp_getxregs
56 57 function gets the extended register state information and places it into
57 58 .Fa xregs .
58 59 Where as the
59 60 .Fn Plwp_setxregs
60 61 function sets the extended register state information in
61 62 .Fa xregs
62 63 for the process handle
63 64 .Fa P .
64 65 .Pp
65 66 Processes must be stopped prior to obtaining the register state of
66 67 individual threads.
67 68 Processes may be stopped with
68 69 .Xr Pstop 3PROC .
69 70 .Pp
70 71 The
71 72 .Sy prxregset_t
72 73 structure is described in
73 74 .Xr proc 4 .
74 75 .Pp
75 76 One may not set the register values of a process that is not an active
76 77 process, e.g. a process handle that refers to a file or a core file.
77 78 .Sh RETURN VALUES
78 79 Upon successful completion, the
79 80 .Fn Plwp_getxregs
80 81 and
81 82 .Fn Plwp_setxregs
82 83 functions return
83 84 .Sy 0
84 85 and get or set the register state.
85 86 Otherwise,
86 87 .Sy -1
87 88 is returned and
88 89 .Sy errno
89 90 is set to indicate the error.
90 91 .Sh ERRORS
91 92 For a full list of possible errors see the
92 93 .Sy DIAGNOSTICS
93 94 section in
94 95 .Xr proc 4 .
95 96 .Pp
96 97 The
97 98 .Fn Plwp_getxregs
98 99 and
99 100 .Fn Plwp_setxregs
100 101 function will fail if:
101 102 .Bl -tag -width Er
102 103 .It Er ENODATA
103 104 The process handle
104 105 .Fa P
105 106 does not have any extended register state information.
106 107 .It Er EBUSY
107 108 The process handle
108 109 .Fa P
109 110 refers to a live process and it is not stopped.
110 111 .It Er ENOENT
111 112 The process handle
112 113 .Fa P
113 114 refers to a live process and there is no thread with id
114 115 .Fa lwpid .
115 116 .It Er EINVAL
116 117 The process handle
117 118 .Fa P
118 119 refers to a core file and there is no thread with id
119 120 .Fa lwpid .
120 121 .El
121 122 .Sh ARCHITECTURE
122 123 The
123 124 .Fn Plwp_getxregs
124 125 and
125 126 .Fn Plwp_setxregs
126 127 functions are only available on
127 128 .Sy SPARC
128 129 platforms.
129 130 .Sh INTERFACE STABILITY
130 131 .Sy Uncommitted
131 132 .Sh MT-LEVEL
132 133 See
133 134 .Sy LOCKING
134 135 in
135 136 .Xr libproc 3LIB .
136 137 .Sh SEE ALSO
137 138 .Xr libproc 3LIB ,
138 139 .Xr Plwp_getfpregs 3PROC ,
139 140 .Xr Plwp_getregs 3PROC ,
140 141 .Xr Plwp_setfpregs 3PROC ,
141 142 .Xr Plwp_setregs 3PROC ,
142 143 .Xr Pstop 3PROC ,
143 144 .Xr proc 4
↓ open down ↓ |
111 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX