PLOCK(2) HP Integral PC PLOCK(2) PLOCK(2) HP Integral PC PLOCK(2) PLOCK(2) HP Integral PC PLOCK(2) PLOCK(2) HP Integral PC PLOCK(2) NAME NAME NAME NAME plock - lock process in physical memory SYNOPSIS SYNOPSIS SYNOPSIS SYNOPSIS plock (op) int op; HP-UX COMPATABILITY HP-UX COMPATABILITY HP-UX COMPATABILITY HP-UX COMPATABILITY Level: HP-UX/RT Origin: System V DESCRIPTION DESCRIPTION DESCRIPTION DESCRIPTION Plock allows the calling process to lock itself (text and data) into physical memory. Op specifies either PROCLOCK (0) or UNLOCK (3); where PROCLOCK implies that the process is to be locked into physical memory, and UNLOCK implies that the process is to be unlocked (allowed to move in physical memory). RETURN VALUE RETURN VALUE RETURN VALUE RETURN VALUE Upon successful completion a value of 0 is returned to the calling process. Otherwise a value of -1 is returned and errno is set to indicate the error. ERRORS ERRORS ERRORS ERRORS If the Plock call is not implemented errno is set to EACCESS. If the op is neither PROCLOCK nor UNLOCK then errno is set to EINVAL. If /dev/kmem is not accessible (required by plock on some OS versions) then errno is set to ENODEV. If the gethostname kernel call fails then errno is set to EEXIST. IMPLEMENTATION NOTES [ HP Integral PC IMPLEMENTATION NOTES [ HP Integral PC IMPLEMENTATION NOTES [ HP Integral PC IMPLEMENTATION NOTES [ HP Integral PC On the HP Integral PC the plock intrinsic is implemented as an OS global counting lock. If one process is locked then all processes are locked. This counting lock remains in effect until all locking processes unlock (i.e. until the counting lock is decremented to 0). If a process increases its size after locking itself, it may be unlocked, given the memory, then re-locked in its new physical memory location. The growth may happen either explicitely (via brk(2) or sbrk(2)), or implicitely (by function calls extending the stack). SEE ALSO SEE ALSO SEE ALSO SEE ALSO brk(2), sbrk(2), shmem(2) Hewlett-Packard - 1 - (printed 12/19/84)