Browse Source

Plan 9 from Bell Labs 2010-11-19

David du Colombier 13 years ago
parent
commit
1a6048d23d
2 changed files with 13 additions and 11 deletions
  1. 3 0
      sys/man/1/vnc
  2. 10 11
      sys/src/9/pc/ether82598.c

+ 3 - 0
sys/man/1/vnc

@@ -232,3 +232,6 @@ only the upper left corner can be accessed.
 .I Vncv
 .I Vncv
 does no verification of the TLS certificate presented
 does no verification of the TLS certificate presented
 by the server.
 by the server.
+.PP
+.I Vncv
+supports only version 3.3 of the RFB protocol.

+ 10 - 11
sys/src/9/pc/ether82598.c

@@ -270,8 +270,8 @@ typedef struct {
 	int	ntd;
 	int	ntd;
 	int	nrb;
 	int	nrb;
 	int	rbsz;
 	int	rbsz;
-	QLock	slock;
-	QLock	alock;
+	Lock	slock;
+	Lock	alock;
 	QLock	tlock;
 	QLock	tlock;
 	Rendez	lrendez;
 	Rendez	lrendez;
 	Rendez	trendez;
 	Rendez	trendez;
@@ -317,10 +317,10 @@ readstats(Ctlr *c)
 {
 {
 	int i;
 	int i;
 
 
-	qlock(&c->slock);
+	lock(&c->slock);
 	for(i = 0; i < nelem(c->stats); i++)
 	for(i = 0; i < nelem(c->stats); i++)
 		c->stats[i] += c->reg[stattab[i].reg >> 2];
 		c->stats[i] += c->reg[stattab[i].reg >> 2];
-	qunlock(&c->slock);
+	unlock(&c->slock);
 }
 }
 
 
 static int speedtab[] = {
 static int speedtab[] = {
@@ -454,7 +454,6 @@ transmit(Ether *e)
 	Td *t;
 	Td *t;
 
 
 	c = e->ctlr;
 	c = e->ctlr;
-//	qlock(&c->tlock);
 	if(!canqlock(&c->tlock)){
 	if(!canqlock(&c->tlock)){
 		im(c, Itx0);
 		im(c, Itx0);
 		return;
 		return;
@@ -804,9 +803,9 @@ attach(Ether *e)
 
 
 	c = e->ctlr;
 	c = e->ctlr;
 	c->edev = e;			/* point back to Ether* */
 	c->edev = e;			/* point back to Ether* */
-	qlock(&c->alock);
+	lock(&c->alock);
 	if(c->alloc){
 	if(c->alloc){
-		qunlock(&c->alock);
+		unlock(&c->alock);
 		return;
 		return;
 	}
 	}
 
 
@@ -816,7 +815,7 @@ attach(Ether *e)
 	t += c->ntd * sizeof *c->tdba + 255;
 	t += c->ntd * sizeof *c->tdba + 255;
 	t += (c->ntd + c->nrd) * sizeof(Block*);
 	t += (c->ntd + c->nrd) * sizeof(Block*);
 	c->alloc = malloc(t);
 	c->alloc = malloc(t);
-	qunlock(&c->alock);
+	unlock(&c->alock);
 	if(c->alloc == nil)
 	if(c->alloc == nil)
 		error(Enomem);
 		error(Enomem);
 
 
@@ -845,11 +844,11 @@ attach(Ether *e)
 	rxinit(c);
 	rxinit(c);
 	txinit(c);
 	txinit(c);
 
 
-	sprint(buf, "#l%dl", e->ctlrno);
+	snprint(buf, sizeof buf, "#l%dl", e->ctlrno);
 	kproc(buf, lproc, e);
 	kproc(buf, lproc, e);
-	sprint(buf, "#l%dr", e->ctlrno);
+	snprint(buf, sizeof buf, "#l%dr", e->ctlrno);
 	kproc(buf, rproc, e);
 	kproc(buf, rproc, e);
-	sprint(buf, "#l%dt", e->ctlrno);
+	snprint(buf, sizeof buf, "#l%dt", e->ctlrno);
 	kproc(buf, tproc, e);
 	kproc(buf, tproc, e);
 }
 }