devmouse: allow multiple writers on /dev/mousein
This commit is contained in:
parent
50493215dd
commit
30907f1d00
1 changed files with 0 additions and 9 deletions
|
@ -44,7 +44,6 @@ struct Mouseinfo
|
||||||
Ref;
|
Ref;
|
||||||
QLock;
|
QLock;
|
||||||
int open;
|
int open;
|
||||||
int inopen;
|
|
||||||
int acceleration;
|
int acceleration;
|
||||||
int maxacc;
|
int maxacc;
|
||||||
Mousestate queue[16]; /* circular buffer of click events */
|
Mousestate queue[16]; /* circular buffer of click events */
|
||||||
|
@ -191,13 +190,6 @@ mouseopen(Chan *c, int omode)
|
||||||
case Qmousein:
|
case Qmousein:
|
||||||
if(!iseve())
|
if(!iseve())
|
||||||
error(Eperm);
|
error(Eperm);
|
||||||
lock(&mouse);
|
|
||||||
if(mouse.inopen){
|
|
||||||
unlock(&mouse);
|
|
||||||
error(Einuse);
|
|
||||||
}
|
|
||||||
mouse.inopen = 1;
|
|
||||||
unlock(&mouse);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
incref(&mouse);
|
incref(&mouse);
|
||||||
|
@ -225,7 +217,6 @@ mouseclose(Chan *c)
|
||||||
if(c->qid.path == Qmouse)
|
if(c->qid.path == Qmouse)
|
||||||
mouse.open = 0;
|
mouse.open = 0;
|
||||||
else if(c->qid.path == Qmousein){
|
else if(c->qid.path == Qmousein){
|
||||||
mouse.inopen = 0;
|
|
||||||
unlock(&mouse);
|
unlock(&mouse);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue