cbgetlck.cpp
来自「CBASE v1.01 采用Borland公司TC++编写的数据库管理源程序库」· C++ 代码 · 共 44 行
CPP
44 行
/* Copyright (c) 1989 Citadel */
/* All Rights Reserved */
/* #ident "@(#)cbgetlck.c 1.4 - 90/06/20" */
/* local headers */
#include "cbase_.h"
/*man---------------------------------------------------------------------------
NAME
cbgetlck - get cbase lock status
SYNOPSIS
#include <cbase.h>
int cbgetlck(cbp)
cbase_t *cbp;
DESCRIPTION
The cbgetlck function reports the lock status of cbase cbp. 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:
CB_UNLCK cbase not locked
CB_RDLCK cbase locked for reading
CB_WRLCK cbase locked for reading and writing
SEE ALSO
cblock.
------------------------------------------------------------------------------*/
int cbgetlck(cbase_t *cbp)
{
if (!(cbp->flags & CBLOCKS)) {
return CB_UNLCK;
} else if (cbp->flags & CBWRLCK) {
return CB_WRLCK;
}
return CB_RDLCK;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?