| plan 9 kernel history: overview | file list | diff list |
1990/08272/port/stream.c (diff list | history)
| 1990/08272/sys/src/9/port/stream.c:24,42 – 1990/0905/sys/src/9/port/stream.c:24,29 (short | long | prev | next) | ||
| 1990/0312 | */ | |
| 1990/0321 | static Qinfo *lds[Nlds+1]; | |
| 1990/0227 | ||
| 1990/0321 |
| |
| 1990/0227 | ||
| 1990/0321 |
| |
| 1990/0227 | /* * All stream structures are ialloc'd at boot time */ | |
| 1990/08272/sys/src/9/port/stream.c:68,73 – 1990/0905/sys/src/9/port/stream.c:55,68 | ||
| 1990/0227 | }; /* | |
| 1990/0905 | * the per stream directory structure */ Dirtab streamdir[]={ "data", Sdataqid, 0, 0600, "ctl", Sctlqid, 0, 0600, }; /* | |
| 1990/0331 | * Dump all block information of how many blocks are in which queues */ void | |
| 1990/08272/sys/src/9/port/stream.c:120,132 – 1990/0905/sys/src/9/port/stream.c:115,133 | ||
| 1990/0227 | * Allocate streams, queues, and blocks. Allocate n block classes with * 1/2(m+1) to class m < n-1 * 1/2(n-1) to class n-1 | |
| 1990/0905 | * * All data areas are alligned to their size. * * No data area crosses a 4k boundary. This allows us to use the * VME/SCSI/LANCE to MP bus maps on the SGI power series machines. | |
| 1990/0227 | */ void streaminit(void) { | |
| 1990/0905 | int class, i, n, left; | |
| 1990/0227 | Block *bp; Bclass *bcp; | |
| 1990/0905 | uchar *ptr; | |
| 1990/0227 | slist = (Stream *)ialloc(conf.nstream * sizeof(Stream), 0); qlist = (Queue *)ialloc(conf.nqueue * sizeof(Queue), 0); | |
| 1990/08272/sys/src/9/port/stream.c:133,138 – 1990/0905/sys/src/9/port/stream.c:134,140 | ||
| 1990/0227 | blist = (Block *)ialloc(conf.nblock * sizeof(Block), 0); bp = blist; n = conf.nblock; | |
| 1990/0905 | left = 0; | |
| 1990/0227 | for(class = 0; class < Nclass; class++){ if(class < Nclass-1) n = n/2; | |
| 1990/08272/sys/src/9/port/stream.c:143,150 – 1990/0905/sys/src/9/port/stream.c:145,159 | ||
| 1990/08272 | * starts on a page boundary. This makes sure * no block crosses a page boundary. */ | |
| 1990/0227 |
| |
| 1990/08272 |
| |
| 1990/0905 | if(bcp->size){ if(bcp->size > left){ left = bcp->size>4096 ? bcp->size : 4096; ptr = (uchar *)ialloc(left, 1); } bp->base = ptr; ptr += bcp->size; left -= bcp->size; } | |
| 1990/0227 | bp->lim = bp->base + bcp->size; bp->flags = class; freeb(bp); | |
| 1990/08272/sys/src/9/port/stream.c:479,532 – 1990/0905/sys/src/9/port/stream.c:488,493 | ||
| 1990/0227 | } /* | |
| 1990/0312 |
| |
| 1990/08272/sys/src/9/port/stream.c:626,639 – 1990/0905/sys/src/9/port/stream.c:587,592 | ||
| 1990/0227 | } /* | |
| 1990/08272/sys/src/9/port/stream.c:1197,1199 – 1990/0905/sys/src/9/port/stream.c:1150,1169 | ||
| 1990/0801 | devdir(c, c->qid, name, n, 0, &dir); convD2M(&dir, db); | |
| 1990/0227 | } | |
| 1990/0905 | /* * announce a line discipline that can be pushed */ void newqinfo(Qinfo *qi) { int i; for(i=0; i<Nlds && lds[i]; i++) if(lds[i] == qi) return; if(i == Nlds) panic("pushable"); lds[i] = qi; } | |