Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ plock(2) — DG/UX 5.4.2A

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

memcntl(2)



plock(2)                         DG/UX 5.4.2                        plock(2)


NAME
       plock - lock data, text, or both into memory

SYNOPSIS
       #include <sys/lock.h>

       int plock(int command);

   where:
       command  The specific operation to be performed

DESCRIPTION
       The behavior of this call is implementation dependent.  Its only
       effects are on performance, both of the process and of the system.

       The plock() function allows the calling process to lock its text
       segment, its data segment, or both into primary memory.  Locking a
       segment via plock() has no real effect in this implementation.  True
       memory locking support is available via the memcntl(2) page locking
       operations.

       The semantics of plock depend upon the value of command as follows:

       TXTLOCK   Lock text segment into memory.  An error is returned and no
                 change is made if the text segment is already locked.

       DATLOCK   Lock data segment into memory.  An error is returned and no
                 change is made if the data segment is already locked.

       PROCLOCK  Lock text and data segments into memory.  An error is
                 returned and no change is made if either the text or data
                 segments are already locked.

       UNLOCK    Remove locks.  This single operation unlocks all currently
                 locked segments - text, data, or both.  An error is
                 returned and no change is made if neither text nor data is
                 locked.

       Note that a TXTLOCK and a DATLOCK operation, in either order, are
       equivalent to a PROCLOCK operation.

       Locks are not inherited across a fork(2) or vfork(2).

ACCESS CONTROL
       The effective user id of the calling process must be superuser.

RETURN VALUE
       Upon successful completion, plock() returns a value of 0. Otherwise,
       it returns the value -1, and sets errno to indicate an error.

DIAGNOSTICS
       Under the following conditions, plock() fails and sets errno to:

       EPERM          if the effective user id of the calling process is not



Licensed material--property of copyright holder(s)                         1




plock(2)                         DG/UX 5.4.2                        plock(2)


                      superuser.

       EINVAL         if command is not a valid command.

       EINVAL         if TXTLOCK is specified and a text lock already exists
                      on the calling process.

       EINVAL         if DATLOCK is specified and a data lock already exists
                      on the calling process.

       EINVAL         if PROCLOCK is specified and a text lock or a data
                      lock already exists on the calling process.

       EINVAL         if UNLOCK is specified and neither a text nor a data
                      lock exists on the calling process.

SEE ALSO
       memcntl(2).







































Licensed material--property of copyright holder(s)                         2


Typewritten Software • bear@typewritten.org • Edmonds, WA 98026