Handling ptr1/ptr2 free (minor nitpicks)

Marc Lehmann schmorp at schmorp.de
Fri Jun 16 22:41:47 CEST 2017

On Fri, Jun 16, 2017 at 01:46:17AM -0400, Jeffrey Johnson <n3npq at mac.com> wrote:
> There; 2 relatively minor issues that are fundamental libeio API design choices.
> 1) req->pri being remapped from 0 -> 4 (by subtracting EIO_PRI_MIN) and hence changed from what was sent.

That's more like a result of the implementation and not a fundamental design

> But (at least) indicate that the memory has been de-allocated already by setting ptr1/ptr2 to NULL
> and perhaps by toggling the flags bits, if you see bio_req handling as “stateful”.

What purpose would that have? Whether you reuse the memory for the request
or not, you have to initialise the structure, no?

> I’d suggest that the better low-level API would be to leave the eio_req object inputs unchanged
> to the greatest extent possible. JMHO ...

Well, it's probably too late for that.

                The choice of a       Deliantra, the free code+content MORPG
      -----==-     _GNU_              http://www.deliantra.net
      ----==-- _       generation
      ---==---(_)__  __ ____  __      Marc Lehmann
      --==---/ / _ \/ // /\ \/ /      schmorp at schmorp.de
      -=====/_/_//_/\_,_/ /_/\_\

More information about the libev mailing list