1 #include "ruby/config.h"
4 #elif defined HAVE_FCNTL && defined HAVE_FCNTL_H
27 flock(
int fd,
int operation)
33 lock.l_type = F_RDLCK;
36 lock.l_type = F_WRLCK;
39 lock.l_type = F_UNLCK;
46 lock.l_start = lock.l_len = 0L;
48 return fcntl(fd, (operation &
LOCK_NB) ? F_SETLK : F_SETLKW, &lock);
51 #elif defined(HAVE_LOCKF)
92 flock(
int fd,
int operation)
102 return lockf (fd, F_LOCK, 0);
110 return lockf (fd, F_TLOCK, 0);
114 return lockf (fd, F_ULOCK, 0);
int flock(int fd, int operation)
void rb_notimplement(void)