LOCK(S) UNIX System V LOCK(S)
Name
lock - locks a process in primary memory
Syntax
int lock(flag);
int flag;
Description
If the flag argument is nonzero, the process executing this
call will not be swapped except if it is required to grow.
If the argument is zero, the process is unlocked. This call
may only be executed by the super-user.
Notes
locked processes interfere with the compaction of primary
memory and can cause deadlock. Systems with small memory
configurations should avoid using this call. It is best to
lock process soon after booting because that will tend to
lock them into one end of memory.
This feature is a XENIX specific enhancement and may not be
present in all UNIX implementations. This routine must be
linked using the linker option -lx.
Standards Conformance
lock is conformant with:
The X/Open Portability Guide II of January 1987.
(printed 6/20/89)