summaryrefslogtreecommitdiff
path: root/src/port/lockf.h
blob: 5ec99b31a78869b02b2d700c3d8f1e6addba0198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#ifndef __LOCKF_H
#define __LOCKF_H

#include "sys.h"

#if !defined HAVE_LOCKF

/* Drop-in replacement for the simplified lockf interface (POSIX) */
#include <fcntl.h>		/* for fcntl and locking flags */

#define F_ULOCK	0		/* Unlock a previously locked region */
#define F_LOCK	1		/* Lock exclusively */
#define F_TLOCK	2		/* Test and lock exclusively */
#define F_TEST	3		/* Test for a locked region */

extern int lockf( int fd, int cmd, off_t len );

#endif /* !defined HAVE_LOCKF */

#endif /* ifndef __LOCKF_H */