Main Content

mexIsLocked (C and Fortran)

Determine if MEX file is locked

C Syntax

#include "mex.h"
bool mexIsLocked(void);

Fortran Syntax

#include "fintrf.h"
integer*4 mexIsLocked()

Description

Call mexIsLocked to determine if the MEX file is locked. By default, MEX files are unlocked, meaning you can clear the MEX file at any time.

To unlock a MEX file, call mexUnlock.

Output Arguments

expand all

Status, returned as true (logical 1 in C or integer*4 1 in Fortran) if the MEX file is locked. Returns false (logical 0 in C or integer*4 0 in Fortran) if the file is unlocked.

Examples

See these examples in matlabroot/extern/examples/mex: