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

1992/0314/port/tcptimer.c (diff list | history)

1992/0128/sys/src/9/port/tcptimer.c:23,331992/0314/sys/src/9/port/tcptimer.c:23,28 (short | long | prev | next)
1991/0424    
	for(;;) { 
		expired = 0; 
 
		/* Run through the list of running timers, decrementing each one. 
		 * If one has expired, take it off the running list and put it 
		 * on a singly linked list of expired timers 
		 */ 
                 
		qlock(&timerlock); 
		for(t = timers;t != 0; t = tp) { 
			tp = t->next; 
1992/0128/sys/src/9/port/tcptimer.c:34,401992/0314/sys/src/9/port/tcptimer.c:29,36
1991/0424    
			if(tp == t) 
				panic("Timer loop at %lux\n",(long)tp); 
	 
 			if(t->state == TIMER_RUN && --(t->count) == 0){ 
1992/0314    
 			if(t->state == TIMER_RUN) 
			if(--(t->count) == 0){ 
1991/0424    
 
				/* Delete from active timer list */ 
				if(timers == t) 
1992/0128/sys/src/9/port/tcptimer.c:52,601992/0314/sys/src/9/port/tcptimer.c:48,61
1991/0424    
		} 
		qunlock(&timerlock); 
 
		while((t = expired) != 0){ 
1992/0314    
		for(;;) { 
			t = expired; 
			if(t == 0) 
				break; 
 
1991/0424    
			expired = t->next; 
			if(t->state == TIMER_EXPIRE && t->func) 
1992/0314    
			if(t->state == TIMER_EXPIRE) 
			if(t->func) 
1991/0424    
				(*t->func)(t->arg); 
		} 
 
1992/0128/sys/src/9/port/tcptimer.c:118,1261992/0314/sys/src/9/port/tcptimer.c:119,128
1991/0424    
		sleep(&tcpflowr, return0, 0); 
 
		for(ifc = base; ifc < etab; ifc++) { 
			if(ifc->stproto == &tcpinfo && 
			   ifc->ref != 0 && ifc->readq && 
			   !QFULL(ifc->readq->next)) { 
1992/0314    
			if(ifc->readq) 
			if(ifc->ref != 0) 
			if(ifc->stproto == &tcpinfo) 
			if(!QFULL(ifc->readq->next)) { 
1991/0424    
				tcprcvwin(ifc); 
				tcp_acktimer(ifc); 
			} 


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