| plan 9 kernel history: overview | file list | diff list |
1992/0807/port/tcptimer.c (diff list | history)
| 1992/0807/sys/src/9/port/tcptimer.c:7,19 – 1992/0903/sys/src/9/port/tcptimer.c:7,60 (short | long | prev | next) | ||
| 1991/0424 | #include "arp.h" #include "ipdat.h" | |
| 1992/0903 | static Timer *timers; /* List of active timers */ static QLock tl; /* Protect timer list */ static Rendez Tcpack; | |
| 1991/0424 | Rendez tcpflowr; | |
| 1992/0903 | static void deltimer(Timer *t) { if(timers == t) timers = t->next; if(t->next) t->next->prev = t->prev; if(t->prev) t->prev->next = t->next; } /* * Poke each tcp connection to recompute window size and * acknowledgement timer */ | |
| 1991/0424 | void | |
| 1992/0903 | tcpflow(void *x) { Ipifc *ifc; Ipconv *cp, **p, **etab; ifc = x; etab = &ifc->conv[Nipconv]; for(;;) { sleep(&tcpflowr, return0, 0); for(p = ifc->conv; p < etab; p++) { cp = *p; if(cp == 0) break; if(cp->readq && cp->ref != 0 && !QFULL(cp->readq->next)) { tcprcvwin(cp); tcpacktimer(cp); } } } } void | |
| 1991/0424 | tcpackproc(void *junk) { Timer *t,*tp; | |
| 1992/0807/sys/src/9/port/tcptimer.c:23,52 – 1992/0903/sys/src/9/port/tcptimer.c:64,81 | ||
| 1991/0424 | for(;;) { expired = 0; | |
| 1992/0903 | qlock(&tl); | |
| 1991/0424 | for(t = timers;t != 0; t = tp) { tp = t->next; | |
| 1992/0314 | if(t->state == TIMER_RUN) if(--(t->count) == 0){ | |
| 1991/0424 |
| |
| 1992/0903 | deltimer(t); | |
| 1991/0424 | t->state = TIMER_EXPIRE; | |
| 1992/0903 | qunlock(&tl); | |
| 1991/0424 | ||
| 1992/0314 | for(;;) { t = expired; | |
| 1992/0807/sys/src/9/port/tcptimer.c:58,133 – 1992/0903/sys/src/9/port/tcptimer.c:87,124 | ||
| 1992/0314 | if(t->func) | |
| 1991/0424 | (*t->func)(t->arg); } | |
| 1992/0903 | tcpgo(Timer *t) | |
| 1991/0424 | { | |
| 1992/0903 | qlock(&tl); | |
| 1991/0424 | t->count = t->start; | |
| 1992/0903 | if(t->state != TIMER_RUN) { | |
| 1991/0424 | t->state = TIMER_RUN; | |
| 1992/0903 | if(t->next) | |
| 1991/0424 | t->next->prev = t; timers = t; } | |
| 1992/0903 | qunlock(&tl); | |
| 1991/0424 | } void | |
| 1992/0903 | tcphalt(Timer *t) | |
| 1991/0424 | { if(t == 0) return; | |
| 1992/0903 | qlock(&tl); if(t->state == TIMER_RUN) deltimer(t); | |
| 1991/0424 | t->state = TIMER_STOP; | |
| 1992/0903 | qunlock(&tl); | |
| 1991/0424 | } | |
| 1992/0626 |
| |
| 1991/0424 |
| |
| 1992/0626 |
| |
| 1991/0424 | ||
| 1992/0626 |
| |
| 1992/0807 | ||
| 1991/0424 |
| |
| 1992/0626 |
| |
| 1992/0807 |
| |
| 1992/0626 |
| |
| 1991/0424 |
| |