File Lock Types

Overview

// macros

#define APR_FLOCK_EXCLUSIVE
#define APR_FLOCK_NONBLOCK
#define APR_FLOCK_SHARED
#define APR_FLOCK_TYPEMASK

Detailed Documentation

Macros

#define APR_FLOCK_EXCLUSIVE

Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a “write lock”.

#define APR_FLOCK_NONBLOCK

do not block while acquiring the file lock

#define APR_FLOCK_SHARED

Shared lock. More than one process or thread can hold a shared lock at any given time. Essentially, this is a “read lock”, preventing writers from establishing an exclusive lock.

#define APR_FLOCK_TYPEMASK

mask to extract lock type