xref: /illumos-gate/usr/src/man/man3proc/Pissyscall.3proc (revision 45ede40b2394db7967e59f19288fae9b62efd4aa)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2015 Joyent, Inc.
13.\"
14.Dd May 11, 2016
15.Dt PISSYSCALL 3PROC
16.Os
17.Sh NAME
18.Nm Pissyscall ,
19.Nm Pissyscall_prev
20.Nd determine if instructions are system call instructions
21.Sh LIBRARY
22.Lb libproc
23.Sh SYNOPSIS
24.In libproc.h
25.Ft int
26.Fo Pissyscall
27.Fa "struct ps_prochandle *P"
28.Fa "uintptr_t addr"
29.Fc
30.Ft int
31.Fo Pissyscall_prev
32.Fa "struct ps_prochandle *P"
33.Fa "uintptr_t addr"
34.Fa "uintptr_t *dst"
35.Fc
36.Sh DESCRIPTION
37The
38.Fn Pissyscall
39function determines whether or not the instructions at
40.Fa addr
41in the process handle
42.Fa P
43corresponds to one of the architecture's system call instructions.
44.Pp
45the
46.Fn Pissyscall_prev
47function determines whether or not the instruction before
48.Fa addr
49in the process handle
50.Fa P
51corresponds to one of the architecture's system call instructions.
52If it does, and
53.Fa dst
54is a
55.Pf non- Dv NULL
56pointer, then the address of the system call instruction will be copied
57into the location pointed to by
58.Fa dst .
59.Sh RETURN VALUES
60Upon successful completion, the
61.Fn Pissyscall
62function returns
63.Sy non-zero
64if
65.Fa addr
66corresponds to a system call instruction.
67Otherwise,
68.Sy 0
69is returned.
70.Pp
71Upon successful completion, the
72.Fn Pissyscall_prev
73function returns
74.Sy non-zero
75if
76.Fa addr
77corresponds to a system call instruction and if
78.Fa dst
79is
80.Pf non- Dv NULL ,
81.Fa dst
82is updated.
83Otherwise,
84.Sy 0
85is returned.
86.Sh INTERFACE STABILITY
87.Sy Uncommitted
88.Sh MT-LEVEL
89See
90.Sy LOCKING
91in
92.Xr libproc 3LIB .
93.Sh SEE ALSO
94.Xr libproc 3LIB
95