libroot/posix/stdio: Remove unused portions.
[haiku.git] / src / system / libroot / posix / sys / flock.c
blob728cf6de24ce9c5f39f7bcbb3daa21c72d71cc32
1 /*
2 * Copyright 2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 */
7 #include <sys/file.h>
9 #include <errno.h>
10 #include <pthread.h>
12 #include <errno_private.h>
13 #include <syscalls.h>
16 int
17 flock(int fd, int op)
19 status_t status = _kern_flock(fd, op);
21 pthread_testcancel();
23 if (status < B_OK) {
24 __set_errno(status);
25 return -1;
28 return 0;