Re: RFC: Does it make sense to build a ocaml-eventfd package?
On Wed, 15 Sep 2010 11:57:28 +0200
Goswin von Brederlow <firstname.lastname@example.org> wrote:
> Obviously the emulation would be for systems that don't have the system
> call to bind to. Might be more friendly than raising Not_available.
ExtUnix is thin and I want to keep it that way. Moreover pipe emulation is
not completely transparent - it introduces 2 fd's not 1 as eventfd. So it
can be a separate code (in the library), but not behind ExtUnix.eventfd.
> Here are some more calls I frequently miss:
> ssize_t pread(int fd, void *buf, size_t count, off_t offset);
> ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
> And read, write, pread, pwrite with Bigarray instead of string for
> zero-copy operations or buffers >16MB on 32bit platforms.
Yes, I have these on the TODO list. Feel free to contribute code :)
> int epoll_create1(int flags);
> int epoll_ctl(int epfd, int op, int fd, struct epoll_event *event);
> int epoll_wait(int epfd, struct epoll_event *events,
> int maxevents, int timeout);
> int epoll_pwait(int epfd, struct epoll_event *events,
> int maxevents, int timeout,
> const sigset_t *sigmask);
> BSD has epoll too but with a different interface. Hopefully close enough
> so we can provide the same interface in ocaml with different
> implementations underneath. Don't know about MacOS X or Windows.
I am personally pretty satisfied with libevent, but again, if anybody
contributes epoll bindings - it is absolutely welcome.