[eio] low-level wrappers

ry at tinyclouds.org ry at tinyclouds.org
Sun Dec 6 10:26:55 CET 2009


Hi Marc,

What would you think about having a set of wrappers like the existing
except that they didn't immediately use SEND? It would also be nice to
manage the eio_req* memory myself (but not have to remember how to
pack the request object); so maybe something like this:

void eio_read2 (eio_req *req, int fd, void *buf, size_t length, off_t
offset, int pri, eio_cb cb, void *data)
{
  INIT_REQ (EIO_READ); req->int1 = fd; req->offs = offset; req->size =
length; req->ptr2 = buf;
}

eio_req *eio_read (int fd, void *buf, size_t length, off_t offset, int
pri, eio_cb cb, void *data)
{
  REQ (EIO_READ);
  eio_read2(req, fd, buf, length, offset, pri, cb, data);
  SEND;
}


Ryan



More information about the libev mailing list