3 * Porting to Minix 2.0.0
4 * Author: Giovanni Falzoni <gfalzoni@pointest.com>
11 #include <sys/types.h>
18 * Name: int flock(int fd, int mode);
19 * Function: Implements the flock function in Minix.
21 int flock(int fd
, int mode
)
26 memset((void *) &lck
, 0, sizeof(struct flock
));
27 lck
.l_type
= mode
& ~LOCK_NB
;
29 if ((retcode
= fcntl(fd
, mode
& LOCK_NB
? F_SETLK
: F_SETLKW
, &lck
)) < 0 && errno
== EAGAIN
)