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

1994/0927/port/qio.c (diff list | history)

1994/0902/sys/src/9/port/qio.c:609,6141994/0927/sys/src/9/port/qio.c:609,615 (short | long | prev | next)
1993/0528    
	bfirst = q->bfirst; 
	q->bfirst = 0; 
1994/0219    
	q->len = 0; 
1994/0927    
	q->noblock = 0; 
1994/0323    
	iunlock(q); 
1993/0527    
 
1993/0528    
	/* free queued blocks */ 
1994/0902/sys/src/9/port/qio.c:649,6551994/0927/sys/src/9/port/qio.c:650,655
1993/0528    
	q->state &= ~Qclosed; 
1993/0601    
	q->state |= Qstarve; 
1993/0908    
	q->eof = 0; 
1994/0902    
	q->noblock = 0; 
	q->limit = q->inilim; 
1993/0530    
} 
 
1994/0902/sys/src/9/port/qio.c:701,7041994/0927/sys/src/9/port/qio.c:701,730
1994/0902    
qnoblock(Queue *q, int onoff) 
{ 
	q->noblock = onoff; 
1994/0927    
} 
 
/* 
 *  flush the output queue 
 */ 
void 
qflush(Queue *q) 
{ 
	Block *b, *bfirst; 
 
	/* mark it */ 
	ilock(q); 
	bfirst = q->bfirst; 
	q->bfirst = 0; 
	q->len = 0; 
	iunlock(q); 
 
	/* free queued blocks */ 
	while(bfirst){ 
		b = bfirst->next; 
		freeb(bfirst); 
		bfirst = b; 
	} 
 
	/* wake up readers/writers */ 
	wakeup(&q->wr); 
1993/0526    
} 


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