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_getregs.3proc.man.txt
+++ new/usr/src/man/man3proc/Plwp_getregs.3proc.man.txt
1 1 PLWP_GETREGS(3PROC) Process Control Library Functions PLWP_GETREGS(3PROC)
2 2
3 3 NAME
4 4 Plwp_getfpregs, Plwp_setfpregs, Plwp_getregs, Plwp_setregs - get and set
5 5 thread registers
6 6
7 -SYNOPSIS
7 +LIBRARY
8 8 Process Control Library (libproc, -lproc)
9 +
10 +SYNOPSIS
9 11 #include <libproc.h>
10 12
11 13 int
12 14 Plwp_getfpregs(struct ps_prochandle *P, lwpid_t lwpid,
13 15 prfpregset_t *fpregs);
14 16
15 17 int
16 18 Plwp_setfpregs(struct ps_prochandle *P, lwpid_t lwpid,
17 19 const prfpregset_t fpregs);
18 20
19 21 int
20 22 Plwp_getregs(struct ps_prochandle *P, lwpid_t lwpid, prpregset_t *gregs);
21 23
22 24 int
23 25 Plwp_setregs(struct ps_prochandle *P, lwpid_t lwpid,
24 26 const prpregset_t gregs);
25 27
26 28 DESCRIPTION
27 29 The Plwp_getregs(), Plwp_setregs(), Plwp_getfpregs(), and
28 30 Plwp_setfpregs() functions allow one to get and set the general purpose
29 31 and floating point registers from the thread lwpid in the process handle
30 32 P.
31 33
32 34 The Plwp_getfpregs() function updates the structure pointed to by fpregs
33 35 with the state and values of the floating point registers of the thread
34 36 specified by lwpid.
35 37
36 38 The Plwp_setfpregs() function updates the floating point registers of the
37 39 thread specified by lwpid to the register state contained in fpregs.
38 40
39 41 The Plwp_getregs() function updates the structure pointed to by gregs
40 42 with the state and values of the general purpose registers of the thread
41 43 specified by lwpid.
42 44
43 45 The Plwp_setregs() function updates the general purpose registers of the
44 46 thread specified by lwpid to the register state contained in gregs.
45 47
46 48 Processes must be stopped before obtaining the register state of
47 49 individual threads. Processes may be stopped with Pstop(3PROC). The
48 50 structures used for registers are described in proc(4) and their
49 51 defintions may be found in <sys/regset.h>. The definitions of these
50 52 structures varies based on the architecture of the system and the running
51 53 process.
52 54
53 55 One may not set the register values of a process that is not an active
54 56 process, e.g. a process handle that refers to a file or a core file.
55 57
56 58 RETURN VALUES
57 59 Upon successful completion, the Plwp_getregs(), Plwp_setregs(),
58 60 Plwp_getfpregs(), and Plwp_setfpregs() functions return 0 and obtain or
59 61 set the register state. Otherwise, -1 is returned, errno is set to
60 62 indicate the error, and the register state is not updated nor are the
61 63 data pointers changed.
62 64
63 65 ERRORS
64 66 For a full list of possible errors also see the DIAGNOSTICS section in
65 67 proc(4).
66 68
67 69 The Plwp_getregs(), Plwp_setregs(), Plwp_getfpregs(), and
68 70 Plwp_setfpregs() will fail if:
69 71
70 72 EBUSY The process handle P is not currently stopped.
71 73
72 74 ENOENT There is no thread in P with id lwpid.
73 75
74 76 INTERFACE STABILITY
75 77 Uncommitted
76 78
77 79 MT-LEVEL
78 80 See LOCKING in libproc(3LIB).
79 81
80 82 SEE ALSO
81 83 libproc(3LIB), proc(4)
82 84
83 85 illumos May 11, 2016 illumos
↓ open down ↓ |
65 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX