1*a32a4683SAxel Dörfler /* 2*a32a4683SAxel Dörfler * Copyright 2008, Haiku Inc. All Rights Reserved. 3*a32a4683SAxel Dörfler * Distributed under the terms of the MIT License. 4*a32a4683SAxel Dörfler */ 5*a32a4683SAxel Dörfler #ifndef _SYS_FILE_H 6*a32a4683SAxel Dörfler #define _SYS_FILE_H 7*a32a4683SAxel Dörfler 8*a32a4683SAxel Dörfler 9*a32a4683SAxel Dörfler #include <sys/types.h> 10*a32a4683SAxel Dörfler 11*a32a4683SAxel Dörfler 12*a32a4683SAxel Dörfler /* for use with flock() */ 13*a32a4683SAxel Dörfler #define LOCK_SH 0x01 /* shared file lock */ 14*a32a4683SAxel Dörfler #define LOCK_EX 0x02 /* exclusive file lock */ 15*a32a4683SAxel Dörfler #define LOCK_NB 0x04 /* don't block when locking */ 16*a32a4683SAxel Dörfler #define LOCK_UN 0x08 /* unlock file */ 17*a32a4683SAxel Dörfler 18*a32a4683SAxel Dörfler 19*a32a4683SAxel Dörfler #ifdef __cplusplus 20*a32a4683SAxel Dörfler extern "C" { 21*a32a4683SAxel Dörfler #endif 22*a32a4683SAxel Dörfler 23*a32a4683SAxel Dörfler extern int flock(int fd, int op); 24*a32a4683SAxel Dörfler 25*a32a4683SAxel Dörfler #ifdef __cplusplus 26*a32a4683SAxel Dörfler } 27*a32a4683SAxel Dörfler #endif 28*a32a4683SAxel Dörfler 29*a32a4683SAxel Dörfler #endif /* _SYS_FILE_H */ 30