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

1991/1126/port/stream.c (diff list | history)

1991/1126/sys/src/9/port/stream.c:962,9831991/1227/sys/src/9/port/stream.c:962,978 (short | long | prev | next)
1990/0227    
	Queue *q, *nq; 
	Block *bp; 
1990/11211    
	int rv; 
1991/0413    
	char err[ERRLEN]; 
1990/0227    
 
	/* 
1990/0629    
	 *  decrement the reference count 
1990/0227    
	 */ 
1990/11161    
	qlock(s); 
1991/0413    
	*err = 0; 
1990/0629    
	if(s->opens == 1){ 
1990/11161    
		/* 
		 *  descend the stream closing the queues 
		 */ 
		for(q = s->procq; q; q = q->next){ 
1991/0413    
			if(waserror()){ 
				if(*err == 0) 
					strncpy(err, u->error, ERRLEN-1); 
			} else { 
1991/1227    
			if(!waserror()){ 
1990/1011    
				if(q->info->close) 
					(*q->info->close)(q->other); 
1990/11161    
				poperror(); 
1991/1126/sys/src/9/port/stream.c:1006,10131991/1227/sys/src/9/port/stream.c:1001,1006
1990/0227    
	 */ 
1990/0629    
	streamexit(s, 1); 
1990/11161    
	qunlock(s); 
1991/0413    
	if(*err) 
		errors(err); 
1990/11211    
	return rv; 
1990/0227    
} 
1990/11211    
int 


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