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