4 * Porting to Minix 2.0.0
5 * Author: Giovanni Falzoni <gfalzoni@pointest.com>
16 * Name: int flock(int fd, int mode);
17 * Function: Implements the flock function in Minix.
19 int flock(int fd
, int mode
)
24 memset((void *) &lck
, 0, sizeof(struct flock
));
25 lck
.l_type
= mode
& ~LOCK_NB
;
27 if ((retcode
= fcntl(fd
, mode
& LOCK_NB
? F_SETLK
: F_SETLKW
, &lck
)) < 0 && errno
== EAGAIN
)