Library Version 12.1.6.2

lock_mutex
Prev | Chapter 1. Dbstl Global Public Functions | Next

## lock_mutex

### Function Details

     int lock_mutex(db_mutex_t mtx)

Lock a mutex, wait if it is held by another thread.

#### Parameters

##### mtx

The mutex handle to lock.

#### Return Value

0 if succeed, non-zero otherwise, call db_strerror to get message.

### Group: Mutex API based on Berkeley DB mutex.

These functions are in-process mutex support which uses Berkeley DB mutex mechanisms.

You can call these functions to do portable synchronization for your code.

### Class

dbstl_global_functions

Prev | Up | Next
alloc_mutex | Home | unlock_mutex