### DB_ENV->mutex_lock

`

###

    #include <db.h>

    int
    DB_ENV->mutex_lock(DB_ENV *dbenv, db_mutex_t mutex);

### Description: DB_ENV->mutex_lock

The DB_ENV->mutex_lock method locks the mutex allocated by DB_ENV->mutex_alloc. The thread of control calling DB_ENV->mutex_lock will block until the lock is available.

The DB_ENV->mutex_lock method may not be called before the DB_ENV->open method has been called.

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

### Parameters

mutex
  The mutex parameter is a mutex previously allocated by DB_ENV->mutex_alloc.

### Errors

The DB_ENV->mutex_lock 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

Database Environments and Related Methods`

Copyright (c) 1996-2005 Sleepycat Software, Inc. - All rights reserved.