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

1990/1212/port/stream.c (diff list | history)

1990/1202/sys/src/9/port/stream.c:314,3191990/1212/sys/src/9/port/stream.c:314,320 (short | long | prev | next)
1990/0227    
	q->put = qi->iput; 
1990/0403    
	q->len = q->nb = 0; 
1990/1009    
	q->ptr = 0; 
1990/1212    
	q->rp = &q->r; 
1990/0227    
	wq = q->other = q + 1; 
 
1990/0702    
	wq->flag = QINUSE; 
1990/1202/sys/src/9/port/stream.c:323,3281990/1212/sys/src/9/port/stream.c:324,330
1990/0227    
	wq->other = q; 
1990/1009    
	wq->ptr = 0; 
1990/0403    
	wq->len = wq->nb = 0; 
1990/1212    
	wq->rp = &wq->r; 
1990/0227    
 
	unlock(q); 
 
1990/1202/sys/src/9/port/stream.c:495,5011990/1212/sys/src/9/port/stream.c:497,503
1990/0312    
		q->len -= BLEN(bp); 
1990/0403    
		q->nb--; 
1990/0406    
		if((q->flag&QHIWAT) && q->len<Streamhi/2 && q->nb<Streambhi/2){ 
1990/0227    
			wakeup(&q->other->next->other->r); 
1990/1212    
			wakeup(q->other->next->other->rp); 
1990/0227    
			q->flag &= ~QHIWAT; 
		} 
		bp->next = 0; 
1990/1202/sys/src/9/port/stream.c:928,9341990/1212/sys/src/9/port/stream.c:930,936
1990/0227    
		freeb(bp); 
		q->flag |= QHUNGUP; 
		q->other->flag |= QHUNGUP; 
1990/0312    
		wakeup(&q->other->r); 
1990/1212    
		wakeup(q->other->rp); 
1990/0321    
		delim = 1; 
1990/0227    
	} else { 
1990/0321    
		delim = 0; 
1990/1202/sys/src/9/port/stream.c:954,9601990/1212/sys/src/9/port/stream.c:956,962
1990/0227    
		unlock(q); 
	} 
1990/0321    
	if(delim) 
		wakeup(&q->r); 
1990/1212    
		wakeup(q->rp); 
1990/0227    
} 
 
/* 
1990/1202/sys/src/9/port/stream.c:1048,10541990/1212/sys/src/9/port/stream.c:1050,1057
1990/0331    
				else 
1990/11211    
					error(Ehungup); 
1990/0331    
			} 
1990/0227    
			sleep(&q->r, &isinput, (void *)q); 
1990/1212    
			q->rp = &q->r; 
			sleep(q->rp, &isinput, (void *)q); 
1990/0227    
			continue; 
		} 
 
1990/1202/sys/src/9/port/stream.c:1167,11731990/1212/sys/src/9/port/stream.c:1170,1177
1990/1113    
		qunlock(&q->rlock); 
		nexterror(); 
	} 
1990/0403    
	sleep(&q->r, notfull, q->next); 
1990/1212    
	q->rp = &q->r; 
	sleep(q->rp, notfull, q->next); 
1990/1018    
	qunlock(&q->rlock); 
1990/1113    
	poperror(); 
1990/0227    
} 


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