tVarious little fixes. - plan9port - [fork] Plan 9 from user space (HTM) git clone git://src.adamsgaard.dk/plan9port (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit 4da83e7ccebd8ab6eb33747d16292567ec59d7dd (DIR) parent c91bd3283a44946fd420ce68c43580aa0d327546 (HTM) Author: rsc <devnull@localhost> Date: Fri, 5 Mar 2004 03:13:13 +0000 Various little fixes. Diffstat: A plumb/initial.plumbing | 5 +++++ M src/cmd/acme/acme.c | 4 ++-- M src/cmd/acme/cols.c | 2 +- M src/cmd/mkfile | 1 + M src/cmd/plumb/plumb.c | 2 +- M src/libthread/channel.c | 1 - M src/libthread/fdwait.c | 5 +++-- 7 files changed, 13 insertions(+), 7 deletions(-) --- (DIR) diff --git a/plumb/initial.plumbing b/plumb/initial.plumbing t@@ -0,0 +1,5 @@ +# to update: cat $HOME/lib/plumbing | 9p write plumb/rules + +editor = acme +include basic + (DIR) diff --git a/src/cmd/acme/acme.c b/src/cmd/acme/acme.c t@@ -45,7 +45,7 @@ Command *command; void acmeerrorinit(void); void readfile(Column*, char*); -int shutdown(void*, char*); +static int shutdown(void*, char*); void derror(Display *d, char *errorstr) t@@ -270,7 +270,7 @@ char *oknotes[] ={ int dumping; -int +static int shutdown(void *v, char *msg) { int i; (DIR) diff --git a/src/cmd/acme/cols.c b/src/cmd/acme/cols.c t@@ -472,7 +472,7 @@ coldragwin(Column *c, Window *w, int but) } /* is it a flick to the right? */ if(abs(p.y-op.y)<10 && p.x>op.x+30 && rowwhichcol(c->row, p)==c) - p.x += Dx(w->r); /* yes: toss to next column */ + p.x = op.x+Dx(w->r); /* yes: toss to next column */ nc = rowwhichcol(c->row, p); if(nc!=nil && nc!=c){ colclose(c, w, FALSE); (DIR) diff --git a/src/cmd/mkfile b/src/cmd/mkfile t@@ -12,3 +12,4 @@ DIRS=`ls -l |sed -n 's/^d.* //p' |egrep -v "$BUGGERED"` <$PLAN9/src/mkdirs +dir-install: $PLAN9/bin/yacc (DIR) diff --git a/src/cmd/plumb/plumb.c b/src/cmd/plumb/plumb.c t@@ -9,7 +9,7 @@ Plumbmsg m; void usage(void) { - fprint(2, "usage: plumb [-p plumbfile] [-a 'attr=value ...'] [-s src] [-d dst] [-t type] [-w wdir] -i | data1\n"); + fprint(2, "usage: plumb [-p plumbfile] [-a 'attr=value ...'] [-s src] [-d dst] [-t type] [-w wdir] -i | data1\n"); exits("usage"); } (DIR) diff --git a/src/libthread/channel.c b/src/libthread/channel.c t@@ -201,7 +201,6 @@ _threadnalt++; }else{ altexec(a, s); /* unlocks chanlock, does splx */ } - _sched(); t->chan = Channone; _threadnalt++; return a - alts; (DIR) diff --git a/src/libthread/fdwait.c b/src/libthread/fdwait.c t@@ -146,10 +146,11 @@ pollidle(void *v) for(i=0; i<npoll; i++) if(pfd[i].fd != -1 && pfd[i].revents){ //fprint(2, " %d", pfd[i].fd); - nbsendul(polls[i].c, 1); pfd[i].fd = -1; pfd[i].events = 0; pfd[i].revents = 0; + nbsendul(polls[i].c, 1); + //fprint(2, " x%d", pfd[i].fd); } //fprint(2, "\n"); } t@@ -192,7 +193,7 @@ _threadfdwait(int fd, int rw, ulong pc) pfd[i].fd = fd; pfd[i].events = rw=='r' ? POLLIN : POLLOUT; polls[i].c = &s.c; - //fprint(2, "%s [%3d] fdwait %d %c list *0x%lux\n", + if(0) fprint(2, "%s [%3d] fdwait %d %c list *0x%lux\n", argv0, threadid(), fd, rw, pc); recvul(&s.c); }