| plan 9 kernel history: overview | file list | diff list |
1990/0717/port/devmnt.c (diff list | history)
| 1990/0703/sys/src/9/port/devmnt.c:54,59 – 1990/0717/sys/src/9/port/devmnt.c:54,60 (short | long | prev | next) | ||
| 1990/0604 | Rendez r; Proc *p; Mntbuf *mbr; | |
| 1990/0717 | int readreply; /* true if we are reader or our reply has come */ | |
| 1990/0227 | }; struct | |
| 1990/0703/sys/src/9/port/devmnt.c:670,675 – 1990/0717/sys/src/9/port/devmnt.c:671,681 | ||
| 1990/0604 | qunlock(q); } | |
| 1990/0717 | int mntreadreply(void *a) { return ((Mnthdr *)a)->readreply; } | |
| 1990/0604 | void | |
| 1990/0227 | mntxmit(Mnt *m, Mnthdr *mh) { | |
| 1990/0703/sys/src/9/port/devmnt.c:760,765 – 1990/0717/sys/src/9/port/devmnt.c:766,772 | ||
| 1990/0604 | mqfree(q); | |
| 1990/0511 | nexterror(); | |
| 1990/03081 | } | |
| 1990/0717 | mh->readreply = 0; | |
| 1990/0604 | if((*devtab[q->msg->type].write)(q->msg, mbw->buf, n) != n){ print("short write in mntxmit\n"); error(0, Eshortmsg); | |
| 1990/0703/sys/src/9/port/devmnt.c:790,795 – 1990/0717/sys/src/9/port/devmnt.c:797,803 | ||
| 1990/0604 | if(w = q->writer){ /* advance a writer to reader */ q->reader = w->p; q->writer = w->next; | |
| 1990/0717 | w->readreply = 1; | |
| 1990/0604 | wakeup(&w->r); } qunlock(q); | |
| 1990/0703/sys/src/9/port/devmnt.c:812,817 – 1990/0717/sys/src/9/port/devmnt.c:820,826 | ||
| 1990/0604 | q->writer = w->next; else ow->next = w->next; | |
| 1990/0717 | w->readreply = 1; | |
| 1990/0604 | wakeup(&w->r); goto Read; } | |
| 1990/0703/sys/src/9/port/devmnt.c:827,833 – 1990/0717/sys/src/9/port/devmnt.c:836,842 | ||
| 1990/0604 | mnterrdequeue(q, mh); nexterror(); } | |
| 1990/0717 | sleep(&mh->r, mntreadreply, mh); | |
| 1990/0604 | poperror(); qlock(q); qlocked = 1; | |
| 1990/0703/sys/src/9/port/devmnt.c:858,861 – 1990/0717/sys/src/9/port/devmnt.c:867,889 | ||
| 1990/0619 | mbfree(mh->mbr); | |
| 1990/0227 | mbfree(mbw); poperror(); | |
| 1990/0717 | } mntdump() { int i; MntQ *q; Mnthdr *h; Proc *p; for(i=0; i<conf.nmntdev; i++){ q = &mntqalloc.arena[i]; if(!q->msg) continue; p = q->reader; print("q rdr %d wrtr ", p? p->pid : 0); for(h=q->writer; h; h=h->next) print("(%lux %lux %d)", h, &h->r, (p=h->p)? p->pid : 0); print("\n"); } | |
| 1990/0227 | } | |