Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

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

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fork(2)

memcntl(2)

reentrant(3)

mlockall(3C)

plock(2)

sysconf(3C)



mlock(3C)                         SDK R4.11                        mlock(3C)


NAME
       mlock, munlock - lock (or unlock) pages in memory

SYNOPSIS
       #include <sys/types.h>
       int mlock(caddrt addr, sizet len);
       int munlock(caddrt addr, sizet len);

DESCRIPTION
       The function mlock uses the mappings established for the address
       range [addr, addr + len) to identify pages to be locked in memory.
       The effect of mlock(addr, len) is equivalent to memcntl(addr, len,
       MCLOCK, 0, 0, 0).

       munlock removes locks established with mlock.  The effect of
       munlock(addr, len) is equivalent to memcntl(addr, len, MCUNLOCK, 0,
       0, 0).

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

RETURN VALUE
   Considerations for Threads Programming
                     +---------+-----------------------------+
                     |         |                      async- |
                     |function | reentrant   cancel   cancel |
                     |         |             point     safe  |
                     +---------+-----------------------------+
                     |mlock    |     Y         Y        N    |
                     |munlock  |     Y         Y        N    |
                     +---------+-----------------------------+
       Upon successful completion, the functions mlock and munlock 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 mlock and munlock requires that the user have appropriate
       privileges.

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


Licensed material--property of copyright holder(s)

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