*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: plock | Section: 2 | Source: Digital UNIX | File: plock.2.gz
plock(2) System Calls Manual plock(2) NAME plock - Locks a process' text and/or data segments in memory SYNOPSIS #include <sys/lock.h> int plock( int opr) ; PARAMETERS Specifies one of the following operations: Locks the text and data seg- ments into memory. Locks the text segment into memory. Locks the data segment into memory. Removes locks. DESCRIPTION The plock() function locks or unlocks a process' text segments, data segments, or both in physical memory. When locked, the physical pages containing the text or data segment will not be paged out. It is an error to lock a segment that is already locked. The caller must have superuser privilege to use the plock() function. Note that memory acquired subsequent to a plock() function may or may not be locked in memory, depending on the specific acquisition method. Memory acquired using the brk() function (or the sbrk() function) is locked if the data segment was locked. Memory acquired via the mmap() or vm_allocate() functions will not be locked. RETURN VALUES Upon successful completion, a value of 0 (zero) is returned to the calling process. Otherwise, a value of -1 is returned and errno is set to indicate the error. ERRORS If the plock() function fails, errno may be set to one of the following values: The caller does not have appropriate privilege. There are in- sufficient resources to perform the operation. The opr parameter is PROCLOCK, but the text segment or the data segment is already locked. The opr parameter is TXTLOCK, but the text segment is already locked. The opr parameter is DATLOCK, but the data segment is already locked. The opr parameter is UNLOCK, but neither the text segment nor the data segment is locked. RELATED INFORMATION Functions: brk(2), mmap(2) delim off plock(2)

Navigation Options