[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: goldsimon
Subject: [lwip-devel] [bug #19167] tcp timeout handler can cause crash being invoked by sys_sem_wait()
Date: Wed, 28 Feb 2007 10:56:51 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv: Gecko/20070219 Firefox/

Follow-up Comment #3, bug #19167 (project lwip):

Executing timeouts only from queues might solve the problem, but it would be
more clear if you could tell the code when you are in a state where you can
execute timeouts.

Using timestamps would be my favourite implementation of timeouts. On
sys_timeout(), you would have to calculate the (absolute) timestamp when this
timeout expires (e.g. 'timeout->expires = sys_time_now()' instead of
'timeout->time = msecs'). Later, in sys_mbox_fetch(), you do something like 

sys_arch_mbox_fetch(mbox, msg, timeouts->next->expires - sys_time_now())

2 downsides of this approach:
- the system has to be time-aware (but it also has to be so, now)
- to prevent time overflow over long time periods, this time would have to be
64-bit... (as we might have to count in miliseconds, 32-bit would overflow in
~50 days)


Reply to this item at:


  Nachricht geschickt von/durch Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]