PreviousNext

dce_db_lock(3dce)

Applies an advisory lock on a backing store

Synopsis

#include <dce/dce.h>
#include <dce/dbif.h>

void dce_db_lock(

dce_db_handle_t handle,

error_status_t *status);

Parameters

Input

handle
A handle, returned from dce_db_open( ), that identifies the backing store being used.

Output

status
A pointer to the completion status. On successful completion, the routine returns error_status_ok. Otherwise, it returns an error.

Description
The dce_db_lock( ) routine acquires the lock associated with the handle.

There is an advisory lock associated with each handle. The routines for storing and deleting backing stores apply the lock before updating a backing store. This routine provides a means to apply the lock for other purposes, such as iteration.

Advisory locks allow cooperating threads to perform consistent operations on backing stores, but do not guarantee consistency; that is, threads may still access backing stores without using advisory locks, possibly resulting in inconsistencies.

Errors

The following describes a partial list of errors that might be returned. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.

db_s_already_locked
An attempt was made to lock a backing store, but it was already locked.

error_status_ok
The call was successful.

Related Information
Functions: dce_db_delete(3dce)

dce_db_delete_by_name(3dce)

dce_db_delete_by_uuid(3dce)

dce_db_store(3dce)

dce_db_store_by_name(3dce)

dce_db_store_by_uuid(3dce)

dce_db_unlock(3dce)