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

1992/0320/port/chan.c (diff list | history)

1992/0213/sys/src/9/port/chan.c:102,1071992/0320/sys/src/9/port/chan.c:102,117 (short | long | prev | next)
1990/0227    
} 
 
void 
1992/0320    
chanfree(Chan *c) 
{ 
	c->flag = CFREE; 
	lock(&chanalloc); 
	c->next = chanalloc.free; 
	chanalloc.free = c; 
	unlock(&chanalloc); 
} 
 
void 
1990/0227    
close(Chan *c) 
{ 
1990/0907    
	if(c->flag & CFREE) 
1992/0213/sys/src/9/port/chan.c:112,1221992/0320/sys/src/9/port/chan.c:122,128
1991/0414    
			(*devtab[c->type].close)(c); 
			poperror(); 
1990/0227    
		} 
1991/0414    
		c->flag = CFREE; 
		lock(&chanalloc); 
		c->next = chanalloc.free; 
		chanalloc.free = c; 
		unlock(&chanalloc); 
1992/0320    
		chanfree(c); 
1990/0227    
	} 
} 
 


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