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

📄 lsgetlck.cpp

📁 CBASE v1.01 采用Borland公司TC++编写的数据库管理源程序库
💻 CPP
字号:
/*	Copyright (c) 1989 Citadel	*/
/*	   All Rights Reserved    	*/

/* #ident	"@(#)lsgetlck.c	1.4 - 90/06/20" */

/* local headers */
#include "lseq_.h"

/*man---------------------------------------------------------------------------
NAME
     lsgetlck - get lseq lock status

SYNOPSIS
     #include <lseq.h>

     int lsgetlck(lsp)
     lseq_t *lsp;

DESCRIPTION
     The lsgetlck function reports the lock status of lseq lsp.  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:

          LS_UNLCK     lseq not locked
          LS_RDLCK     lseq locked for reading
          LS_WRLCK     lseq locked for reading and writing

SEE ALSO
     lslock.

------------------------------------------------------------------------------*/
int lsgetlck(lseq_t *lsp)
{
	if (!(lsp->flags & LSLOCKS)) {
		return LS_UNLCK;
	} else if (lsp->flags & LSWRLCK) {
		return LS_WRLCK;
	}

	return LS_RDLCK;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -