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
  37 The
  38 .Fn Pissyscall
  39 function determines whether or not the instructions at
  40 .Fa addr
  41 in the process handle
  42 .Fa P
  43 corresponds to one of the architecture's system call instructions.
  44 .Pp
  45 the
  46 .Fn Pissyscall_prev
  47 function determines whether or not the instruction before
  48 .Fa addr
  49 in the process handle
  50 .Fa P
  51 corresponds to one of the architecture's system call instructions.
  52 If it does, and
  53 .Fa dst
  54 is a
  55 .Pf non- Dv NULL
  56 pointer, then the address of the system call instruction will be copied
  57 into the location pointed to by
  58 .Fa dst .
  59 .Sh RETURN VALUES
  60 Upon successful completion, the
  61 .Fn Pissyscall
  62 function returns
  63 .Sy non-zero
  64 if
  65 .Fa addr
  66 corresponds to a system call instruction.
  67 Otherwise,
  68 .Sy 0
  69 is returned.
  70 .Pp
  71 Upon successful completion, the
  72 .Fn Pissyscall_prev
  73 function returns
  74 .Sy non-zero
  75 if
  76 .Fa addr
  77 corresponds to a system call instruction and if
  78 .Fa dst
  79 is
  80 .Pf non- Dv NULL ,
  81 .Fa dst
  82 is updated.
  83 Otherwise,
  84 .Sy 0
  85 is returned.
  86 .Sh INTERFACE STABILITY
  87 .Sy Uncommitted
  88 .Sh MT-LEVEL
  89 See
  90 .Sy LOCKING
  91 in
  92 .Xr libproc 3LIB .
  93 .Sh SEE ALSO
  94 .Xr libproc 3LIB