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

1991/0820/gnot/lock.c (diff list | history)

1991/0723/sys/src/9/gnot/lock.c:16,301991/0820/sys/src/9/gnot/lock.c:16,31 (short | long | prev | next)
1990/03091    
	 * Try the fast grab first 
	 */ 
1991/0723    
    	if(tas(&l->key) == 0){ 
1991/0614    
		if(u && u->p) 
1991/0820    
		if(u) 
1991/0614    
			u->p->hasspin = 1; 
1991/0723    
		l->pc = ((ulong*)&l)[PCOFF]; 
1990/03091    
		return; 
	} 
1991/0723    
	for(i = 0; i < 1000; i++){ 
		sched(); 
1991/0820    
	for(i = 0; i < 100000; i++){ 
		if(u && u->p->state == Running) 
			sched(); 
1991/0723    
    		if (tas(&l->key) == 0){ 
1991/0614    
			if(u && u->p) 
1991/0820    
			if(u) 
1991/0614    
				u->p->hasspin = 1; 
1991/0723    
			l->pc = ((ulong*)&l)[PCOFF]; 
1990/03091    
			return; 


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