Support select() on FDs that are already writable
authorBarret Rhoden <brho@cs.berkeley.edu>
Tue, 3 May 2016 19:52:41 +0000 (15:52 -0400)
committerBarret Rhoden <brho@cs.berkeley.edu>
Tue, 3 May 2016 19:56:34 +0000 (15:56 -0400)
commit3b8664e0dfbddeada3a36e4e849ce34cb1224fab
tree3d6cca5156badd2a689729bfee7253463351ee26
parent59cbc60f1fe89dea7d39acf786c68a02969c38ed
Support select() on FDs that are already writable

This is an extension of commit 6cb2d8c1ce77 ("Allow select() calls on FDs
that are already ready").  There, we were dealing with reads.  The same
problem happens with writes.

Now, reads or writes will be detected, given that the underlying device
reports DMREADABLE/DMWRITABLE in its stat message.

Signed-off-by: Barret Rhoden <brho@cs.berkeley.edu>
user/iplib/select.c