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