2 ** Copyright 1998 - 1999 Double Precision, Inc. See COPYING for
3 ** distribution information.
14 #include <sys/fcntl.h>
22 int ll_lockfd(int fd
, int ltype
, LL_OFFSET_TYPE start
, LL_OFFSET_TYPE len
)
25 || (ltype
& ll_whence_curpos
)
26 || (ltype
& ll_whence_end
))
32 return (flock(fd
, ltype
& ll_unlock
? LOCK_UN
:
33 (ltype
& ll_writelock
? LOCK_EX
:LOCK_SH
) |
34 (ltype
& ll_wait
? 0:LOCK_NB
)));