2 .\" Copyright 1989 AT&T. Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved.
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH PLOCK 3C "Mar 22, 2004"
8 plock \- lock or unlock into memory process, text, or data
14 \fBint\fR \fBplock\fR(\fBint\fR \fIop\fR);
20 The \fBplock()\fR function allows the calling process to lock or unlock into
21 memory its text segment (text lock), its data segment (data lock), or both its
22 text and data segments (process lock). Locked segments are immune to all
23 routine swapping. The effective user ID of the calling process must be
24 super-user to use this call.
27 The \fBplock()\fR function performs the function specified by \fIop\fR:
34 Lock text and data segments into memory (process lock).
43 Lock text segment into memory (text lock).
52 Lock data segment into memory (data lock).
67 Upon successful completion, \fB0\fR is returned. Otherwise, \fB\(mi1\fR is
68 returned and \fBerrno\fR is set to indicate the error.
72 The \fBplock()\fR function fails and does not perform the requested operation
89 The \fIop\fR argument is equal to \fBPROCLOCK\fR and a process lock, a text
90 lock, or a data lock already exists on the calling process; the \fIop\fR
91 argument is equal to \fBTXTLOCK\fR and a text lock or a process lock already
92 exists on the calling process; the \fIop\fR argument is equal to \fBDATLOCK\fR
93 and a data lock or a process lock already exists on the calling process; or the
94 \fIop\fR argument is equal to \fBUNLOCK\fR and no lock exists on the calling
104 The {\fBPRIV_PROC_LOCK_MEMORY\fR} privilege is not asserted in the effective
105 set of the calling process.
111 The \fBmlock\fR(3C) and \fBmlockall\fR(3C) functions are the preferred
112 interfaces for process locking.
116 See \fBattributes\fR(5) for descriptions of the following attributes:
124 ATTRIBUTE TYPE ATTRIBUTE VALUE
132 \fBexec\fR(2), \fBexit\fR(2), \fBfork\fR(2), \fBmemcntl\fR(2), \fBmlock\fR(3C),
133 \fBmlockall\fR(3C), \fBattributes\fR(5)