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

1990/1104/port/chan.c (diff list | history)

1990/1009/sys/src/9/port/chan.c:14,321990/1104/sys/src/9/port/chan.c:14,36 (short | long | prev | next)
1990/0227    
int 
incref(Ref *r) 
{ 
1990/1104    
	int x; 
 
1990/0227    
	lock(r); 
	r->ref++; 
1990/1104    
	x = ++r->ref; 
1990/0227    
	unlock(r); 
	return r->ref; 
1990/1104    
	return x; 
1990/0227    
} 
 
int 
decref(Ref *r) 
{ 
1990/1104    
	int x; 
 
1990/0227    
	lock(r); 
	r->ref--; 
1990/1104    
	x = --r->ref; 
1990/0227    
	unlock(r); 
	return r->ref; 
1990/1104    
	return x; 
1990/0227    
} 
 
void 


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