anuragsoni / kqueue-ml Goto Github PK
View Code? Open in Web Editor NEWOCaml bindings to kqueue
Home Page: https://anuragsoni.github.io/kqueue-ml/kqueue/Kqueue/index.html
License: BSD 3-Clause "New" or "Revised" License
OCaml bindings to kqueue
Home Page: https://anuragsoni.github.io/kqueue-ml/kqueue/Kqueue/index.html
License: BSD 3-Clause "New" or "Revised" License
So far this library has been just tested on macOS. We should test this on the various BSD systems (starting with FreeBSD, OpenBSD), and add tests to ensure the library works on them.
Some differences across the various systems is the type definition for kevent.
macOS:
struct kevent {
uintptr_t ident; /* identifier for this event */
int16_t filter; /* filter for event */
uint16_t flags; /* general flags */
uint32_t fflags; /* filter-specific flags */
intptr_t data; /* filter-specific data */
void *udata; /* opaque user data identifier */
};
NetBSD
struct kevent {
uintptr_t ident; /* identifier for this event */
uint32_t filter; /* filter for event */
uint32_t flags; /* action flags for kqueue */
uint32_t fflags; /* filter flag value */
int64_t data; /* filter data value */
void *udata; /* opaque user data identifier */
};
openBSD:
struct kevent {
uintptr_t ident; /* identifier for this event */
short filter; /* filter for event */
u_short flags; /* action flags for kqueue */
u_int fflags; /* filter flag value */
int64_t data; /* filter data value */
void *udata; /* opaque user data identifier */
};
FreeBSD:
struct kevent {
uintptr_t ident; /* identifier for this event */
short filter; /* filter for event */
u_short flags; /* action flags for kqueue */
u_int fflags; /* filter flag value */
int64_t data; /* filter data value */
void *udata; /* opaque user data identifier */
uint64_t ext[4]; /* extensions */
};
Another area that will take some work is to go over the various filters and filter flags (NOTE_*), to add os specific support for each platform. We already use ppx_optcomp
for some conditional compilation, we could leverage it further to work with filters and flags that aren't defined on all platforms. The list of variables generated by our dune setup that can be consumed via ppx_optcomp is available at
kqueue-ml/lib/config/config.ml
Lines 32 to 38 in 521dca9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.