repo.or.cz
/
haiku.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
libroot/posix/stdio: Remove unused portions.
[haiku.git]
/
src
/
system
/
libroot
/
posix
/
sys
/
flock.c
blob
728cf6de24ce9c5f39f7bcbb3daa21c72d71cc32
1
/*
2
* Copyright 2008, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
3
* Distributed under the terms of the MIT License.
4
*/
5
6
7
#include <sys/file.h>
8
9
#include <errno.h>
10
#include <pthread.h>
11
12
#include <errno_private.h>
13
#include <syscalls.h>
14
15
16
int
17
flock
(
int
fd
,
int
op
)
18
{
19
status_t status
=
_kern_flock
(
fd
,
op
);
20
21
pthread_testcancel
();
22
23
if
(
status
<
B_OK
) {
24
__set_errno
(
status
);
25
return
-
1
;
26
}
27
28
return
0
;
29
}
30