From: Ben Gras Date: Fri, 8 May 2009 13:50:29 +0000 (+0000) Subject: don't suspend the process as a side-effect if X-Git-Tag: v3.1.4~55 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/Bv9ARM.ch05.html?a=commitdiff_plain;h=ece26e27310db40745c7988fa2fec9e3487d101b;p=minix.git don't suspend the process as a side-effect if device returns SUSPEND if it's select; select already does this. --- diff --git a/servers/vfs/device.c b/servers/vfs/device.c index 744db491b..a7a969153 100644 --- a/servers/vfs/device.c +++ b/servers/vfs/device.c @@ -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;