xref: /illumos-gate/usr/src/man/man3proc/Psync.3proc (revision e3c4d829fd2f5ea07a7203c4a9a02f1b8b3b18d6)
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
34The
35.Fn Psync
36function synchronizes modifications to the process handle
37.Fa P
38back to the underlying active process.
39The
40.Fn Psync
41function ensures that any outstanding process holds, register
42modifications, signal injections, and modifications to the various fault
43and system call tracing flags are taken care of.
44.Pp
45Normally this function is not required as other library routines take
46care of synchronizing this state out to the process when it is required.
47If the underlying /proc file system routines are used outside of the
48library, calling this function may be required.
49.Pp
50The
51.Fn Psync
52function is only meaningful for active processes.
53It will do nothing on process handles that refer to core files, zombie
54processes, and ELF objects.
55.Pp
56The
57.Fn Lsync
58function is equivalent to the
59.Fn Psync
60function, except rather than operating on the entire process and its
61representative thread, it instead operates on the thread handle
62.Fa L .
63.Sh INTERFACE STABILITY
64.Sy Uncommitted
65.Sh MT-LEVEL
66See
67.Sy LOCKING
68in
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 5
82