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

1994/0323/port/taslock.c (diff list | history)

1994/0322/sys/src/9/port/taslock.c:22,361994/0323/sys/src/9/port/taslock.c:22,42 (short | long | prev | next)
1994/0322    
void 
ilock(Lock *l) 
{ 
	l->sr = splhi(); 
	if(tas(&l->key) == 0) 
1994/0323    
	ulong x; 
 
	x = splhi(); 
	if(tas(&l->key) == 0){ 
		l->sr = x; 
1994/0322    
		return; 
1994/0323    
	} 
1994/0322    
 
	for(;;){ 
		while(l->key) 
			; 
		if(tas(&l->key) == 0) 
1994/0323    
		if(tas(&l->key) == 0){ 
			l->sr = x; 
1994/0322    
			return; 
1994/0323    
		} 
1994/0322    
	} 
} 
 


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