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