>> I happen to really like timerfds but they are a linuxism. > How would they be used here?
>From what I understand, after having used timerfd for a small “projet de réseau”… Instead of what babeld is currently doing: struct timeval tv; gettime(&now); timeval_min(&tv, &some_timer); select(maxfd + 1, &readfds, NULL, NULL, &tv); You create a file descriptor for each new timer. You can chose which clock to use, and if the timer should fire periodically, or at some defined later time. The fd can be monitored with select. When the timer expires, it generates some kind of read event and select exits. A timerfd can be re-armed after it expires, it’s reusable. The API is quite minimalistic. Of course, it’s all managed by the kernel. timerfd_create, timerfd_settime, timerfd_gettime. LWN and the manual are my sources. A quick grep shows that libev does not use timerfd, but libevent does. -- Antonin
_______________________________________________ Babel-users mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/babel-users
