That sounds totally fine; in fact, it's how my Poller library works.
> We do check for the EWOULDBLOCK stuff and re-register the
> event.
But do you remember that this fd is ready until EWOULDBLOCK?
i.e. if you're notified that an fd is ready, and then you
don't for whatever reason continue to do I/O on it until EWOULDBLOCK,
you'll never ever be notified that it's ready again.
If your code assumes that it will be notified again anyway,
as with poll(), it will be sorely disappointed.
> The thing we do not currently do is, attempt to read or write
> unless we've received notification first. This is what I am assuming is
> breaking it.
Yeah, that would break it, too, I think.
- Dan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/