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/Psysentry.3proc
+++ new/usr/src/man/man3proc/Psysentry.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 PSYSENTRY 3PROC
16 16 .Os
17 17 .Sh NAME
18 18 .Nm Psysentry ,
19 19 .Nm Psysexit
20 20 .Nd set system call entry and exit actions
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 Psysentry
26 27 .Fa "struct ps_prochandle *P"
27 28 .Fa "int which"
28 29 .Fa "int stop"
29 30 .Fc
30 31 .Ft int
31 32 .Fo Psysexit
32 33 .Fa "struct ps_prochandle *P"
33 34 .Fa "int which"
34 35 .Fa "int stop"
35 36 .Fc
36 37 .Sh DESCRIPTION
37 38 The
38 39 .Fn Psysentry
39 40 and
40 41 .Fn Psysexit
41 42 functions controls what actions the process handle
42 43 .Fa P
43 44 should take upon executing a system call.
44 45 .Pp
45 46 The system allows a process to be stopped on both entry and exit of a
46 47 system call.
47 48 For information on the state of the process when it is stopped due to system
48 49 call tracing, see the
49 50 .Sy PCSENTRY
50 51 and
51 52 .Sy PCSEXIT
52 53 sections of
53 54 .Xr proc 4 .
54 55 .Pp
55 56 The value of the
56 57 .Fa stop
57 58 parameter controls whether or not the system call listed in
58 59 .Fa which
59 60 causes the process to stop.
60 61 A value of non-zero indicates the process should stop;
61 62 a value of 0 indicates it should not.
62 63 .Pp
63 64 The value of
64 65 .Fa which
65 66 indicates which system call the change applies to.
66 67 A value of 0 applies to all system calls.
67 68 Note, the system does not supply a stable mapping from system call names to
68 69 identifiers.
69 70 .Pp
70 71 These functions only apply to actively running processes.
71 72 They do not function on handles that refer to core files, zombie processes,
72 73 or ELF objects.
73 74 .Sh RETURN VALUES
74 75 Upon successful completion, the
75 76 .Fn Psysentry
76 77 and
77 78 .Fn Psysexit
78 79 functions return the previous disposition of the system call --
79 80 .Sy 0
80 81 if it was not set to stop and
81 82 .Sy 1
82 83 if it was --
83 84 and the system call state is updated.
84 85 Otherwise,
85 86 .Sy -1
86 87 is returned,
87 88 .Dv errno
88 89 is updated with the error that occurred, and the system call state is
89 90 not updated.
90 91 .Sh ERRORS
91 92 The
92 93 .Fn Psysentry
93 94 and
94 95 .Fn Psysexit
95 96 functions will fail if:
96 97 .Bl -tag -width Er
97 98 .It Er EINVAL
98 99 The value of
99 100 .Fa which
100 101 is invalid, e.g. it is less than zero or greater than the largest defined
101 102 system call.
102 103 .It Er ENOENT
103 104 The handle
104 105 .Fa P
105 106 refers to a process that is a zombie, a core file, or an ELF object.
106 107 .El
107 108 .Sh INTERFACE STABILITY
108 109 .Sy Uncommitted
109 110 .Pp
110 111 Note, while the
111 112 .Fn Psysentry
112 113 and
113 114 .Fn Psysexit
114 115 functions are uncommitted, the mapping of system calls to system call
115 116 numbers is
116 117 .Sy Not-an-Interface
117 118 and may change at any time.
118 119 .Sh MT-LEVEL
119 120 See
120 121 .Sy LOCKING
121 122 in
122 123 .Xr libproc 3LIB .
123 124 .Sh SEE ALSO
124 125 .Xr libproc 3LIB ,
125 126 .Xr proc 4 ,
126 127 .Xr attributes 5
↓ open down ↓ |
94 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX