OpenTP1 Version 7 Programming Reference C Language

[Contents][Index][Back][Next]

dc_lck_release_byname - Release resource from lock specified by name

Format

ANSI C, C++

#include <dclck.h>
int  dc_lck_release_byname (char *name, DCLONG ownerflag,
                            DCLONG flags)

K&R C

#include <dclck.h>
int  dc_lck_release_byname (name, ownerflag, flags)
char      *name;
DCLONG    ownerflag;
DCLONG    flags;

Description

The function dc_lck_release_byname() specifies the name of a resource for which the function dc_lck_get() specified lock, and releases the resource from the lock. Call the function dc_lck_release_byname() when releasing the resource from lock before the synchronization point is acquired.

When the global transaction with lock specified terminates, the OpenTP1 lock service automatically releases the resource from lock. In this case, there is no need to specify release from lock in the UAP.

Arguments whose values are set in the UAP

name

Specify the name of the resource to be released from lock. The resource name must be identical to the name specified in the function dc_lck_get().

ownerflag

Specify DCLCK_OWNER_MIGRATE.

flags

Specify DCNOFLAGS.

Return values

Return value Return value (numeric) Explanation
DC_OK 0 Normal termination.
DCLCKER_PARAM -401 The value specified for the argument is invalid.
DCLCKER_NOTHING -456 The resource that corresponds to the resource name specified for release from lock does not exist.
DCLCKER_OUTOFTRN -455 The function was called from a UAP which was not operating as a transaction.
DCLCKER_VERSION -457 The OpenTP1 library version does not match the lock service version.