[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #19167] tcp timeout handler can cause crash being invo
From: |
Andreas Becker |
Subject: |
[lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait() |
Date: |
Wed, 28 Feb 2007 15:05:55 +0000 |
User-agent: |
Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.4 (like Gecko) (Debian) |
Follow-up Comment #5, bug #19167 (project lwip):
Sorry for my word time-stamp. I don't want to use absolute timeouts, because
it will be hard to handle if the systime is later than ->expires. Blocked for
a (long) time...
I would prefer to keep the old timeout handling. Only to know how long a task
was running.
typedef u32_t timestamp_t;
#define TIMESTAMP_DIFF(t1, t2) ((timestamp_t)((t1) - (t2)))
/* No problem with timer overrun, if executed every INT32U_MAX/2 -> ca.
24days @1ms timertick*/
timeouts = sys_arch_timeouts();
timestamp_t diff = TIMESTAMP_DIFF(sys_time_now(), timeouts->remember)
:again
if (!timeouts || !timeouts->next) {
sys_arch_mbox_fetch(mbox, msg, 0);
} else {
/* ANDREAS -> execute old pending timeouts */
if (timeouts->next->time > diff) {
diff -= timeouts->next->time;
time = SYS_ARCH_TIMEOUT;
} else {
timeouts->next->time -= diff;
time = sys_arch_mbox_fetch(mbox, msg, timeouts->next->time);
}
}
if (time == SYS_ARCH_TIMEOUT) {
/* Do the timer_Handler stuff */
--> see sys_mbox_fetch()
} else {
timeouts->remember = sys_time_now();
/* No more stuff like timeouts->next->time ... needed */
}
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?19167>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/
- [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait(), Dmitry Potapov, 2007/02/27
- [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait(), goldsimon, 2007/02/28
- [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait(), Andreas Becker, 2007/02/28
- [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait(), goldsimon, 2007/02/28
- [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait(), Dmitry Potapov, 2007/02/28
- [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait(),
Andreas Becker <=
- [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait(), Dmitry Potapov, 2007/02/28
- [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait(), Andreas Becker, 2007/02/28
- [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait(), Dmitry Potapov, 2007/02/28
- [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait(), Dmitry Potapov, 2007/02/28