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 PSYNC 3PROC
  16 .Os
  17 .Sh NAME
  18 .Nm Psync ,
  19 .Nm Lsync
  20 .Nd synchronize cached tracing flags and modifications
  21 .Sh LIBRARY
  22 .Lb libproc
  23 .Sh SYNOPSIS
  24 .In libproc.h
  25 .Ft void
  26 .Fo Psync
  27 .Fa "struct ps_prochandle *P"
  28 .Fc
  29 .Ft void
  30 .Fo Lsync
  31 .Fa "struct ps_lwphandle *L"
  32 .Fc
  33 .Sh DESCRIPTION
  34 The
  35 .Fn Psync
  36 function synchronizes modifications to the process handle
  37 .Fa P
  38 back to the underlying active process.
  39 The
  40 .Fn Psync
  41 function ensures that any outstanding process holds, register
  42 modifications, signal injections, and modifications to the various fault
  43 and system call tracing flags are taken care of.
  44 .Pp
  45 Normally this function is not required as other library routines take
  46 care of synchronizing this state out to the process when it is required.
  47 If the underlying /proc file system routines are used outside of the
  48 library, calling this function may be required.
  49 .Pp
  50 The
  51 .Fn Psync
  52 function is only meaningful for active processes.
  53 It will do nothing on process handles that refer to core files, zombie
  54 processes, and ELF objects.
  55 .Pp
  56 The
  57 .Fn Lsync
  58 function is equivalent to the
  59 .Fn Psync
  60 function, except rather than operating on the entire process and its
  61 representative thread, it instead operates on the thread handle
  62 .Fa L .
  63 .Sh INTERFACE STABILITY
  64 .Sy Uncommitted
  65 .Sh MT-LEVEL
  66 See
  67 .Sy LOCKING
  68 in
  69 .Xr libproc 3LIB .
  70 .Sh SEE ALSO
  71 .Xr libproc 3LIB ,
  72 .Xr Pfault 3PROC ,
  73 .Xr Pputareg 3PROC ,
  74 .Xr Psetfault 3PROC ,
  75 .Xr Psetsignal 3PROC ,
  76 .Xr Psetsysentry 3PROC ,
  77 .Xr Psetsysexit 3PROC ,
  78 .Xr Psignal 3PROC ,
  79 .Xr Psysentry 3PROC ,
  80 .Xr Psysexit 3PROC ,
  81 .Xr proc 4