Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ plock(2) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

exec(2)

exit(2)

fork(2)



     plock(2)                   DG/UX 4.30                    plock(2)



     NAME
          plock - Lock data, text, or both into memory.

     SYNOPSIS
          int  plock (command)
          int         command;

     PARAMETERS
          command        Denotes the specific operation.

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

          Plock allows the calling process to lock its text segment,
          its data segment, or both into memory.  The locking of a
          segment has no effect in this implementation but may have
          the effect of either making pages in the segment less likely
          to be thrown out of memory than the pages of unlocked
          segments or the pages could actually be wired.  Locked
          segments (sometimes referred to as "wired" into memory) are
          immune from all routine paging.  Plock also allows these
          segments to be unlocked.  The effective user id of the
          calling process must be super-user.

          The semantics of plock depend upon 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.




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





     plock(2)                   DG/UX 4.30                    plock(2)



          Locks are not inherited across a fork or vfork.

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

     RETURN VALUE
          0              The plock operation was successful.

          -1             An error occurred.  Errno is set to indicate
                         the error.

     EXCEPTIONS
          Plock will fail and not perform the requested operation if
          an error occurs.  Errno may be set to one of the following
          error codes regardless of the value of command:

          EPERM          The effective user id of the calling process
                         is not super-user.

          EINVAL         Command is not a valid command.

          The TXTLOCK command may return the following errors:

          EINVAL         A text lock or a process lock already exists
                         on the calling process.

          The DATLOCK command may return the following errors:

          EINVAL         A data lock or a process lock already exists
                         on the calling process.

          The PROCLOCK command may return the following errors:

          EINVAL         A text lock or a data lock already exists on
                         the calling process.

          The UNLOCK command may return the following errors:

          EINVAL         Neither a text nor a data lock exists on the
                         calling process.

     SEE ALSO
          The related system calls:  exec(2), exit(2), fork(2).











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



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