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

1994/1206/pc/clock.c (diff list | history)

1994/1206/sys/src/9/pc/clock.c:35,631995/0104/sys/src/9/pc/clock.c:35,48 (short | long | prev | next)
move time accounting into accounttime. (XXX check for changes where this went?)
rsc Fri Mar 4 12:44:25 2005
1993/1124    
static void 
clock(Ureg *ur, void *arg) 
{ 
	Proc *p; 
	int nrun = 0; 
                 
	USED(arg); 
 
	m->ticks++; 
 
1995/0104    
	accounttime(); 
1993/1124    
	checkalarms(); 
1994/0128    
	hardclock(); 
1994/0715    
	uartclock(); 
1993/1124    
                 
	/* 
	 *  process time accounting 
	 */ 
	p = m->proc; 
	if(p){ 
		nrun = 1; 
		p->pc = ur->pc; 
		if (p->state==Running) 
			p->time[p->insyscall]++; 
	} 
	nrun = (nrdy+nrun)*1000; 
	MACHP(0)->load = (MACHP(0)->load*19+nrun)/20; 
 
1994/0809    
	if(up && up->state == Running){ 
1994/0507    
		if(anyready()) 


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