plan 9 kernel history: overview | file list | diff list

1990/0406/port/sturp.c (diff list | history)

1990/0403/sys/src/9/port/sturp.c:575,5941990/0406/sys/src/9/port/sturp.c:575,594 (short | long | prev | next)
1990/0312    
	 *  fill the transmit buffers 
1990/0227    
	 */ 
1990/0312    
	q = up->wq; 
1990/0403    
	for(bp = getq(q); q->first && up->xb[up->nxb]==0; up->nxb = NEXT(up->nxb)){ 
		if(bp == 0) 
			bp = getq(q); 
1990/0312    
		if(BLEN(bp) > up->maxblock){ 
			nbp = up->xb[up->nxb] = allocb(0); 
			nbp->rptr = bp->rptr; 
			nbp->wptr = bp->rptr = bp->rptr + up->maxblock; 
		} else { 
			up->xb[up->nxb] = bp; 
1990/0403    
			bp = 0; 
1990/0406    
	if(up->xb[up->nxb]==0) { 
		for(bp=getq(q); bp && up->xb[up->nxb]==0; up->nxb=NEXT(up->nxb)){ 
			if(BLEN(bp) > up->maxblock){ 
				nbp = up->xb[up->nxb] = allocb(0); 
				nbp->rptr = bp->rptr; 
				nbp->wptr = bp->rptr = bp->rptr + up->maxblock; 
			} else { 
				up->xb[up->nxb] = bp; 
				bp = getq(q); 
			} 
1990/0227    
		} 
1990/0406    
		if(bp) 
			putbq(q, bp); 
1990/0227    
	} 
1990/0312    
	if(bp) 
		putbq(q, bp); 
/*	print("output w(%d) up->xb[%d](%ux) up->nxb(%d) up->state(%ux)\n", 
		WINDOW(up), up->next, up->xb[up->next], up->nxb, up->state); 
/**/ 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)