don't suspend the process as a side-effect if

device returns SUSPEND if it's select; select already
does this.
This commit is contained in:
Ben Gras 2009-05-08 13:50:29 +00:00
parent 2a48c4ad48
commit ece26e2731

View File

@ -458,8 +458,11 @@ int suspend_reopen; /* Just suspend the process */
(*dp->dmap_io)(dp->dmap_driver, &dev_mess);
if (dev_mess.REP_STATUS == EINTR) dev_mess.REP_STATUS = EAGAIN;
} else {
/* Suspend user. */
suspend(dp->dmap_driver);
/* select() will do suspending itself. */
if(op != DEV_SELECT) {
/* Suspend user. */
suspend(dp->dmap_driver);
}
assert(!GRANT_VALID(fp->fp_grant));
fp->fp_grant = gid; /* revoke this when unsuspended. */
fp->fp_ioproc = ioproc;