munlock(), munlock_r()

QNX SDP8.0C Library ReferenceAPIDeveloper

Unlock the address space of a process

Synopsis:

#include <sys/mman.h>

int munlock( const void * addr,
             size_t len );

int munlock_r( const void * addr,
               size_t len );

Arguments:

addr
The starting address for the range of process address space.
len
The amount of memory to unlock, in bytes.

Library:

libc

Use the -l c option to qcc to link against this library. This library is usually included automatically.

Description:

Note:
In this QNX OS release, all memory is locked for the entire duration of the process, so this function does nothing.

The munlock() and munlock_r() functions unlock address space on a whole-page basis for any part of the calling process's address space starting at address addr and continuing for len bytes, regardless of how many times mlock() has been called by the process for any of the pages in the specified range.

These functions are identical, except in the way they indicate errors. Refer to the Returns section for details.

Returns:

The only difference between these functions is the way they indicate errors:

munlock()
This function always returns 0 (success).
munlock_r()
This function always returns EOK (success).
CAUTION:
In earlier releases, this function could return errors under certain conditions. For QNX SDP 8, this function always succeeds. For more information, refer to the QNX SDP 8.0.x Release Notes.

Classification:

POSIX 1003.1 MLR

Safety:
Cancellation pointNo
Signal handlerYes
ThreadYes
Page updated: