btgetlck.cpp
来自「CBASE v1.01 采用Borland公司TC++编写的数据库管理源程序库」· C++ 代码 · 共 45 行
CPP
45 行
/* Copyright (c) 1989 Citadel */
/* All Rights Reserved */
/* #ident "@(#)btgetlck.c 1.4 - 90/06/20" */
/* local headers */
#include "btree_.h"
/*man---------------------------------------------------------------------------
NAME
btgetlck - get btree lock status
SYNOPSIS
#include <btree.h>
int btgetlck(btp)
btree_t *btp;
DESCRIPTION
The btgetlck function reports the lock status of a btree. The
btp argument is an open btree. The function returns the status
of the lock currently held by the calling process. Locks held by
other processes are not reported.
The possible return values are:
BT_UNLCK btree not locked
BT_RDLCK btree locked for reading
BT_WRLCK btree locked for reading and writing
SEE ALSO
btlock.
------------------------------------------------------------------------------*/
int btgetlck(btree_t *btp)
{
if (!(btp->flags & BTLOCKS)) {
return BT_UNLCK;
} else if (btp->flags & BTWRLCK) {
return BT_WRLCK;
}
return BT_RDLCK;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?