xref: /illumos-gate/usr/src/man/man3proc/Pissyscall.3proc (revision ab618543cc6fc4bc273c077ef5d247961cdb29d4)
143051d27SRobert Mustacchi.\"
243051d27SRobert Mustacchi.\" This file and its contents are supplied under the terms of the
343051d27SRobert Mustacchi.\" Common Development and Distribution License ("CDDL"), version 1.0.
443051d27SRobert Mustacchi.\" You may only use this file in accordance with the terms of version
543051d27SRobert Mustacchi.\" 1.0 of the CDDL.
643051d27SRobert Mustacchi.\"
743051d27SRobert Mustacchi.\" A full copy of the text of the CDDL should have accompanied this
843051d27SRobert Mustacchi.\" source.  A copy of the CDDL is also available via the Internet at
943051d27SRobert Mustacchi.\" http://www.illumos.org/license/CDDL.
1043051d27SRobert Mustacchi.\"
1143051d27SRobert Mustacchi.\"
1243051d27SRobert Mustacchi.\" Copyright 2015 Joyent, Inc.
1343051d27SRobert Mustacchi.\"
1443051d27SRobert Mustacchi.Dd May 11, 2016
1543051d27SRobert Mustacchi.Dt PISSYSCALL 3PROC
1643051d27SRobert Mustacchi.Os
1743051d27SRobert Mustacchi.Sh NAME
1843051d27SRobert Mustacchi.Nm Pissyscall ,
1972d3dbb9SYuri Pankov.Nm Pissyscall_prev
2043051d27SRobert Mustacchi.Nd determine if instructions are system call instructions
21*ab618543SJohn Levon.Sh LIBRARY
2243051d27SRobert Mustacchi.Lb libproc
23*ab618543SJohn Levon.Sh SYNOPSIS
2443051d27SRobert Mustacchi.In libproc.h
2543051d27SRobert Mustacchi.Ft int
2643051d27SRobert Mustacchi.Fo Pissyscall
2743051d27SRobert Mustacchi.Fa "struct ps_prochandle *P"
2843051d27SRobert Mustacchi.Fa "uintptr_t addr"
2943051d27SRobert Mustacchi.Fc
3043051d27SRobert Mustacchi.Ft int
3143051d27SRobert Mustacchi.Fo Pissyscall_prev
3243051d27SRobert Mustacchi.Fa "struct ps_prochandle *P"
3343051d27SRobert Mustacchi.Fa "uintptr_t addr"
3443051d27SRobert Mustacchi.Fa "uintptr_t *dst"
3543051d27SRobert Mustacchi.Fc
3643051d27SRobert Mustacchi.Sh DESCRIPTION
3743051d27SRobert MustacchiThe
3843051d27SRobert Mustacchi.Fn Pissyscall
3943051d27SRobert Mustacchifunction determines whether or not the instructions at
4043051d27SRobert Mustacchi.Fa addr
4143051d27SRobert Mustacchiin the process handle
4243051d27SRobert Mustacchi.Fa P
4343051d27SRobert Mustacchicorresponds to one of the architecture's system call instructions.
4443051d27SRobert Mustacchi.Pp
4543051d27SRobert Mustacchithe
4643051d27SRobert Mustacchi.Fn Pissyscall_prev
4743051d27SRobert Mustacchifunction determines whether or not the instruction before
4843051d27SRobert Mustacchi.Fa addr
4943051d27SRobert Mustacchiin the process handle
5043051d27SRobert Mustacchi.Fa P
5172d3dbb9SYuri Pankovcorresponds to one of the architecture's system call instructions.
5272d3dbb9SYuri PankovIf it does, and
5343051d27SRobert Mustacchi.Fa dst
5443051d27SRobert Mustacchiis a
5543051d27SRobert Mustacchi.Pf non- Dv NULL
5643051d27SRobert Mustacchipointer, then the address of the system call instruction will be copied
5743051d27SRobert Mustacchiinto the location pointed to by
5843051d27SRobert Mustacchi.Fa dst .
5943051d27SRobert Mustacchi.Sh RETURN VALUES
6043051d27SRobert MustacchiUpon successful completion, the
6143051d27SRobert Mustacchi.Fn Pissyscall
6243051d27SRobert Mustacchifunction returns
6343051d27SRobert Mustacchi.Sy non-zero
6443051d27SRobert Mustacchiif
6543051d27SRobert Mustacchi.Fa addr
6672d3dbb9SYuri Pankovcorresponds to a system call instruction.
6772d3dbb9SYuri PankovOtherwise,
6843051d27SRobert Mustacchi.Sy 0
6943051d27SRobert Mustacchiis returned.
7043051d27SRobert Mustacchi.Pp
7143051d27SRobert MustacchiUpon successful completion, the
7243051d27SRobert Mustacchi.Fn Pissyscall_prev
7343051d27SRobert Mustacchifunction returns
7443051d27SRobert Mustacchi.Sy non-zero
7543051d27SRobert Mustacchiif
7643051d27SRobert Mustacchi.Fa addr
7743051d27SRobert Mustacchicorresponds to a system call instruction and if
7843051d27SRobert Mustacchi.Fa dst
7943051d27SRobert Mustacchiis
8043051d27SRobert Mustacchi.Pf non- Dv NULL ,
8143051d27SRobert Mustacchi.Fa dst
8272d3dbb9SYuri Pankovis updated.
8372d3dbb9SYuri PankovOtherwise,
8443051d27SRobert Mustacchi.Sy 0
8543051d27SRobert Mustacchiis returned.
8643051d27SRobert Mustacchi.Sh INTERFACE STABILITY
8743051d27SRobert Mustacchi.Sy Uncommitted
8843051d27SRobert Mustacchi.Sh MT-LEVEL
8943051d27SRobert MustacchiSee
9043051d27SRobert Mustacchi.Sy LOCKING
9143051d27SRobert Mustacchiin
9243051d27SRobert Mustacchi.Xr libproc 3LIB .
9343051d27SRobert Mustacchi.Sh SEE ALSO
9443051d27SRobert Mustacchi.Xr libproc 3LIB
95