Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mlockall(3C) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fork(2)

memcntl(2)

reentrant(3)

mlock(3C)

plock(2)

sysconf(3C)



mlockall(3C)                   DG/UX R4.11MU05                  mlockall(3C)


NAME
       mlockall, munlockall - lock or unlock address space

SYNOPSIS
       #include <sys/mman.h>
       int mlockall(int flags);
       int munlockall(void);

DESCRIPTION
       The function mlockall causes all pages mapped by an address space to
       be locked in memory.  The effect of mlockall(flags) is equivalent to:

              memcntl(0, 0, MCLOCKAS, flags, 0, 0)

       The value of flags determines whether the pages to be locked are
       those currently mapped by the address space, those that will be
       mapped in the future, or both:
                      MCLCURRENT   Lock current mappings
                      MCLFUTURE    Lock future mappings

       The function munlockall removes address space locks and locks on
       mappings in the address space.  The effect of munlockall is
       equivalent to:
              memcntl(0, 0, MCUNLOCKAS, 0, 0, 0)

       Locks established with mlockall are not inherited by a child process
       after a fork and are not nested.


   Considerations for Threads Programming
                    +-----------+-----------------------------+
                    |           |                      async- |
                    |function   | reentrant   cancel   cancel |
                    |           |             point     safe  |
                    +-----------+-----------------------------+
                    |mlockall   |     Y         Y        N    |
                    |munlockall |     Y         Y        N    |
                    +-----------+-----------------------------+

RETURN VALUE
       Upon successful completion, the functions mlockall and munlockall
       return a value of 0; otherwise, they return a value of -1 and set
       errno to indicate an error.

DIAGNOSTICS
       See memcntl(2).

NOTES
       Use of mlockall and munlockall requires that the user have
       appropriate privileges.

SEE ALSO
       fork(2), memcntl(2), reentrant(3), mlock(3C), plock(2), sysconf(3C).


Licensed material--property of copyright holder(s)

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