⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 btgetlck.cpp

📁 CBASE v1.01 采用Borland公司TC++编写的数据库管理源程序库
💻 CPP
字号:
/*	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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -