devmouse: allow multiple writers on /dev/mousein

This commit is contained in:
cinap_lenrek 2011-11-03 02:33:09 +01:00
parent 50493215dd
commit 30907f1d00

View file

@ -44,7 +44,6 @@ struct Mouseinfo
Ref;
QLock;
int open;
int inopen;
int acceleration;
int maxacc;
Mousestate queue[16]; /* circular buffer of click events */
@ -191,13 +190,6 @@ mouseopen(Chan *c, int omode)
case Qmousein:
if(!iseve())
error(Eperm);
lock(&mouse);
if(mouse.inopen){
unlock(&mouse);
error(Einuse);
}
mouse.inopen = 1;
unlock(&mouse);
break;
default:
incref(&mouse);
@ -225,7 +217,6 @@ mouseclose(Chan *c)
if(c->qid.path == Qmouse)
mouse.open = 0;
else if(c->qid.path == Qmousein){
mouse.inopen = 0;
unlock(&mouse);
return;
}