| plan 9 kernel history: overview | file list | diff list |
1992/0128/port/tcptimer.c (diff list | history)
| 1991/0424/sys/src/9/port/tcptimer.c:19,24 – 1991/1115/sys/src/9/port/tcptimer.c:19,25 (short | long) | ||
| 1991/0424 | Timer *t,*tp; Timer *expired; | |
| 1991/1115 | USED(junk); | |
| 1991/0424 | for(;;) { expired = 0; | |
| 1991/1115/sys/src/9/port/tcptimer.c:3,9 – 1992/0111/sys/src/9/port/tcptimer.c:3,9 (short | long) | ||
|
Move error.h to ../port. Change errors to actual strings.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1991/0424 | #include "mem.h" #include "dat.h" #include "fns.h" | |
| 1992/0111 | #include "../port/error.h" | |
| 1991/0424 | #include "arp.h" #include "ipdat.h" | |
| 1992/0111/sys/src/9/port/tcptimer.c:1,4 – 1992/0128/sys/src/9/port/tcptimer.c:1,4 (short | long) | ||
| 1991/0424 |
| |
| 1992/0128 | #include "u.h" | |
| 1991/0424 | #include "lib.h" #include "mem.h" #include "dat.h" | |
| 1992/0128/sys/src/9/port/tcptimer.c:23,33 – 1992/0314/sys/src/9/port/tcptimer.c:23,28 (short | long) | ||
| 1991/0424 | for(;;) { expired = 0; | |
| 1992/0128/sys/src/9/port/tcptimer.c:34,40 – 1992/0314/sys/src/9/port/tcptimer.c:29,36 | ||
| 1991/0424 | if(tp == t) panic("Timer loop at %lux\n",(long)tp); | |
| 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,60 – 1992/0314/sys/src/9/port/tcptimer.c:48,61 | ||
| 1991/0424 | } qunlock(&timerlock); | |
| 1992/0314 | for(;;) { t = expired; if(t == 0) break; | |
| 1991/0424 | expired = t->next; | |
| 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,126 – 1992/0314/sys/src/9/port/tcptimer.c:119,128 | ||
| 1991/0424 | sleep(&tcpflowr, return0, 0); for(ifc = base; ifc < etab; ifc++) { | |
| 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); } | |
| 1992/0314/sys/src/9/port/tcptimer.c:1,5 – 1992/0321/sys/src/9/port/tcptimer.c:1,5 (short | long) | ||
|
Move lib.h to ../port.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1992/0128 | #include "u.h" | |
| 1991/0424 |
| |
| 1992/0321 | #include "../port/lib.h" | |
| 1991/0424 | #include "mem.h" #include "dat.h" #include "fns.h" | |
| 1992/0321/sys/src/9/port/tcptimer.c:108,130 – 1992/0626/sys/src/9/port/tcptimer.c:108,132 (short | long) | ||
| 1991/0424 | } void | |
| 1992/0626 | tcpflow(void *x) | |
| 1991/0424 | { | |
| 1992/0626 | Ipifc *ifc; Ipconv *cp, **p, **etab; | |
| 1991/0424 |
| |
| 1992/0626 | ifc = x; etab = &ifc->conv[Nipconv]; | |
| 1991/0424 | for(;;) { sleep(&tcpflowr, return0, 0); | |
| 1992/0314 |
| |
| 1991/0424 |
| |
| 1992/0626 | for(p = ifc->conv; p < etab; p++) { cp = *p; if(cp == 0) break; if(cp->readq) if(cp->ref != 0) if(!QFULL(cp->readq->next)) { tcprcvwin(cp); tcp_acktimer(cp); | |
| 1991/0424 | } } } | |
| 1992/0626/sys/src/9/port/tcptimer.c:115,120 – 1992/0807/sys/src/9/port/tcptimer.c:115,121 (short | long) | ||
| 1991/0424 | ||
| 1992/0626 | ifc = x; etab = &ifc->conv[Nipconv]; | |
| 1992/0807 | ||
| 1991/0424 | for(;;) { sleep(&tcpflowr, return0, 0); | |
| 1992/0626/sys/src/9/port/tcptimer.c:122,130 – 1992/0807/sys/src/9/port/tcptimer.c:123,129 | ||
| 1992/0626 | cp = *p; if(cp == 0) break; | |
| 1992/0807 | if(cp->readq && cp->ref != 0 && !QFULL(cp->readq->next)) { | |
| 1992/0626 | tcprcvwin(cp); tcp_acktimer(cp); | |
| 1991/0424 | } | |
| 1992/0807/sys/src/9/port/tcptimer.c:7,19 – 1992/0903/sys/src/9/port/tcptimer.c:7,60 (short | long) | ||
| 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 |
| |
| 1992/0903/sys/src/9/port/tcptimer.c:57,89 – 1992/0906/sys/src/9/port/tcptimer.c:57,90 (short | long) | ||
| 1992/0903 | void | |
| 1991/0424 | tcpackproc(void *junk) { | |
| 1992/0906 | Timer *t, *tp, *timeo; | |
| 1991/0424 | ||
| 1991/1115 | USED(junk); | |
| 1991/0424 | for(;;) { | |
| 1992/0906 | timeo = 0; | |
| 1991/0424 | ||
| 1992/0903 | qlock(&tl); | |
| 1991/0424 | for(t = timers;t != 0; t = tp) { tp = t->next; | |
| 1992/0314 |
| |
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0906 | if(t->state == TimerON) { t->count--; if(t->count == 0) { deltimer(t); t->state = TimerDONE; t->next = timeo; timeo = t; } | |
| 1991/0424 | } } | |
| 1992/0903 | qunlock(&tl); | |
| 1991/0424 | ||
| 1992/0314 | for(;;) { | |
| 1992/0906 | t = timeo; | |
| 1992/0314 | if(t == 0) break; | |
| 1991/0424 |
| |
| 1992/0314 |
| |
| 1992/0906 | timeo = t->next; if(t->state == TimerDONE) | |
| 1992/0314 | if(t->func) | |
| 1991/0424 | (*t->func)(t->arg); } | |
| 1992/0903/sys/src/9/port/tcptimer.c:99,106 – 1992/0906/sys/src/9/port/tcptimer.c:100,107 | ||
| 1991/0424 | ||
| 1992/0903 | qlock(&tl); | |
| 1991/0424 | t->count = t->start; | |
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0906 | if(t->state != TimerON) { t->state = TimerON; | |
| 1991/0424 | t->prev = 0; t->next = timers; | |
| 1992/0903 | if(t->next) | |
| 1992/0903/sys/src/9/port/tcptimer.c:117,124 – 1992/0906/sys/src/9/port/tcptimer.c:118,125 | ||
| 1991/0424 | return; | |
| 1992/0903 | qlock(&tl); | |
| 1992/0906 | if(t->state == TimerON) | |
| 1992/0903 | deltimer(t); | |
| 1991/0424 |
| |
| 1992/0906 | t->state = TimerOFF; | |
| 1992/0903 | qunlock(&tl); | |
| 1991/0424 | } | |
| 1992/0906/sys/src/9/port/tcptimer.c:1,125 – 1993/0804/sys/src/9/port/tcptimer.c:0 (short | long) | ||
|
Deleted.
rsc Mon Mar 7 10:32:26 2005 | ||
| 1992/0128 |
| |
| 1992/0321 |
| |
| 1991/0424 |
| |
| 1992/0111 |
| |
| 1991/0424 |
| |
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0906 |
| |
| 1991/0424 | ||
| 1991/1115 |
| |
| 1991/0424 |
| |
| 1992/0906 |
| |
| 1991/0424 | ||
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0906 |
| |
| 1991/0424 |
| |
| 1992/0903 |
| |
| 1991/0424 | ||
| 1992/0314 |
| |
| 1992/0906 |
| |
| 1992/0314 |
| |
| 1992/0906 |
| |
| 1992/0314 |
| |
| 1991/0424 |
| |
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0906 |
| |
| 1991/0424 |
| |
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0903 |
| |
| 1991/0424 |
| |
| 1992/0903 |
| |
| 1992/0906 |
| |
| 1992/0903 |
| |
| 1992/0906 |
| |
| 1992/0903 |
| |
| 1991/0424 |
| |