lock(2)
NAME
lock − lock a process in primary memory
SYNTAX
int lock(flag)
int flag;
DESCRIPTION
The lock system call locks the calling process in memory. That is, if the flag argument is non-zero, the calling process will not be swapped except if it is required to grow. If the argument is zero, the process is unlocked.
RESTRICTIONS
This call may only be executed by the superuser.
Locked processes interfere with the compaction of primary memory and can cause deadlock. This system call is not considered a permanent part of the system.
RETURN VALUE
If unsuccessful, returns a −1, and the global variable errno indicates the error code.
DIAGNOSTICS
The lock call will fail if:
[EPERM] The effective user ID is not the superuser.
ASSEMBLER
(lock = 53.)
sys lock; flag