📄 cbgetlck.cpp
字号:
/* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -