Re: RFC: async I/O facility: "zpoll" API

Andy Ross

As promised, the prototype is up for review here: zconfig.h: Add DEFINED() macro for expresion-legal ifdef-checking DO NOT MERGE: zpoll: asynchronous I/O framework

Note that it's a few patches behind. The semaphore group patch merged
while this was sitting on my box and they collide a bit. I'll get
that sorted out. Most of Ben's comments are still unaddressed, in
particular naming.

Other notes, just to preempt criticism:

+ There still aren't any real drivers ported to the new scheme, so
usage is a little academic right now. Priority 1 for me is getting
uart_qmsi working with this so I can push a test that makes sense.
Most drivers should port cleanly I think; the existing
driver_sync_call_t turns out to be a mostly perfect fit to be
reimplemented in terms of zpoll.

+ There is no true queueing for complete requests, so the actual
implementation of zpoll() itself is based on iterating over the set
of events. That was done originally to save having to bake a list
pointer into the event structure, but now that callbacks are in this
is unavoidable anyway. I'll get that fixed.

+ The pend/unpend mechanism was copied directly out of the semaphore
implementation so I didn't have to figure out exactly how it
works. :) So there's a wait_q in the call record which is needless,
as there can only ever be one thread pended.


Join to automatically receive all group messages.