Closed daurnimator closed 9 years ago
Available since linux 3.0 (22 Jul 2011)
The timerfd_settime() system call adds a TFD_TIMER_CANCEL_ON_SET flag. If this flag is set for a CLOCK_REALTIME absolute (TFD_TIMER_ABSTIME) timer, then the timer is expired if the clock is reset.
timerfd_settime()
TFD_TIMER_CANCEL_ON_SET
CLOCK_REALTIME
TFD_TIMER_ABSTIME
cqueues = require"cqueues"; S=require"syscall"; fd=S.timerfd_create("realtime", "cloexec,nonblock"); assert(fd:timerfd_settime(3)); print("Waiting for settimeofday"); cqueues.sleep({pollfd=fd:getfd(), events="r"}) print("Clock changed!")
Wrong place! You already had ABSTIME bound: https://github.com/justincormack/ljsyscall/blob/f364b0cfc243f0b3427a52029689c832bb49f72f/syscall/linux/constants.lua#L733
ABSTIME
:+1:
Available since linux 3.0 (22 Jul 2011)