plock man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



plock(2)							      plock(2)

NAME
     plock - lock into memory or unlock process, text, or data

C SYNOPSIS
     #include <sys/lock.h>

     int plock(int op);

DESCRIPTION
     plock allows the calling process to lock into memory or unlock its text
     segment (text lock), its data segment (data lock), or both its text and
     data segments (process lock).  Locked segments are immune to all routine
     swapping.	The calling process must have the super-user privilege to use
     this call.

     plock does not lock down memory which has been mapped into the address
     space of a process via the mmap(2) system call (e.g., IRIX Arenas).
     These mmaped memory regions may be locked down using one of the following
     system calls: mpin(2), mlock(3C), mlockall(3C).

     plock does not lock down the stack of the calling process.	 The stack of
     a process can only be locked into memory with the mlockall(3C) system
     call.

     plock performs the function specified by op:

	  PROCLOCK    Lock text and data segments into memory (process lock).

	  TXTLOCK     Lock text segment into memory (text lock).

	  DATLOCK     Lock data segment into memory (data lock).

	  UNLOCK      Remove locks.

     plock fails and does not perform the requested operation if one or more
     of the following are true:

     EPERM	    The calling process does not have the super-user
		    privilege.

     EINVAL	    op is equal to PROCLOCK and a process lock, a text lock,
		    or a data lock already exists on the calling process.

     EINVAL	    op is equal to TXTLOCK and a text lock, or a process lock
		    already exists on the calling process.

     EINVAL	    op is equal to DATLOCK and a data lock, or a process lock
		    already exists on the calling process.

     EINVAL	    op is equal to UNLOCK and no lock exists on the calling
		    process.

									Page 1

plock(2)							      plock(2)

     EAGAIN	    Not enough memory.

SEE ALSO
     intro(2), exec(2), exit(2), fork(2), getrlimit(2), mlock(3C),
     mlockall(3C), mpin(2), memcntl(2), shmctl(2), ulimit(2).

DIAGNOSTICS
     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.

WARNING
     The plock function and mlockall/munlockall pair provide similar
     functionality. Developers should choose the set that best suites their
     application and stick with it, as mixing the interfaces may result in
     unexpected behavior.

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net