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

1991/0805/port/proc.c (diff list | history)

1991/0727/sys/src/9/port/proc.c:319,3241991/0805/sys/src/9/port/proc.c:319,328 (short | long | prev | next)
postnote: only reset r->p if its us (seems dodgy? what's the race?)
rsc Mon Mar 20 17:14:14 2006
1991/0727    
		sched();	/* notepending may go true while asleep */ 
	if(p->notepending){ 
		p->notepending = 0; 
1991/0805    
		lock(r); 
		if(r->p == p) 
			r->p = 0; 
		unlock(r); 
1990/11211    
		error(Eintr); 
1990/0227    
	} 
} 
1991/0727/sys/src/9/port/proc.c:338,3431991/0805/sys/src/9/port/proc.c:342,351
1991/0727    
	} 
	if(p->notepending){ 
		p->notepending = 0; 
1991/0805    
		lock(r); 
		if(r->p == p) 
			r->p = 0; 
		unlock(r); 
1990/11211    
		error(Eintr); 
1990/0227    
	} 
} 
1991/0727/sys/src/9/port/proc.c:419,4291991/0805/sys/src/9/port/proc.c:427,437
1990/0227    
		s = splhi(); 
		lock(r); 
1991/0727    
		if(p->r==r && r->p==p){	/* check we won the race */ 
1990/0227    
			r->p = 0; 
			if(p->state != Wakeme) 
				panic("postnote wakeup: not Wakeme"); 
			p->r = 0; 
			ready(p); 
1991/0805    
			if(p->state == Wakeme){ 
				r->p = 0; 
				p->r = 0; 
				ready(p); 
			} 
1990/0227    
		} 
		unlock(r); 
		splx(s); 


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