Berkeley DB Reference Version 5.3.33

DB_ENV->mutex_alloc()

#include <db.h>

int
DB_ENV->mutex_alloc(DB_ENV *dbenv, u_int32_t flags, db_mutex_t *mutexp);  

The DB_ENV->mutex_alloc() method allocates a mutex and returns a reference to it into the memory specified by mutexp.

The DB_ENV->mutex_alloc() method may not be called before the DB_ENV->open() method is called.

The DB_ENV->mutex_alloc() method returns a non-zero error value on failure and 0 on success.

Parameters

flags

The flags parameter must be set to 0 or by bitwise inclusively OR'ing together one or more of the following values:

mutexp

The mutexp parameter references memory into which the mutex reference is copied.

Errors

The DB_ENV->mutex_alloc() method may fail and return one of the following non-zero errors:

EINVAL

An invalid flag value or parameter was specified.

Class

DB_ENV

See Also

Mutex Methods