home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frostbyte's 1980s DOS Shareware Collection
/
floppyshareware.zip
/
floppyshareware
/
DOOG
/
CBASE09.ZIP
/
LSEQ.ZIP
/
LSGETLCK.C
< prev
next >
Wrap
Text File
|
1989-08-30
|
1KB
|
44 lines
/* Copyright (c) 1989 Citadel */
/* All Rights Reserved */
/* #ident "lsgetlck.c 1.1 - 89/07/03" */
#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_RDLCK lseq locked for reading
LS_WRLCK lseq locked for reading and writing
LS_UNLCK lseq not locked
SEE ALSO
lslock.
------------------------------------------------------------------------------*/
int lsgetlck(lsp)
lseq_t *lsp;
{
if (!(lsp->flags & LSLOCKS)) {
return LS_UNLCK;
} else if (lsp->flags & LSWRLCK) {
return LS_WRLCK;
}
return LS_RDLCK;
}