zephyr/net/ip/contiki/os
Sebastien Griffoul 3a5eb1c742 net: timer_expired may not return the right value when called twice
timer_expired uses the nano_timer_test API to determine whether a
timer has expired. This API calls the private function
_nano_timer_expire_wait which returns the timer user data if this
timer has expired. Unfortunately _nano_timer_expire_wait clears the
user data pointer after returning it.
Therefore if timer_expired is called several times for the same timer
and if this timer has already expired then only the first call returns
the expected value (true). Other calls always return false.

In ipv6 this bug can be seen with the uip_ds6_periodic timer. Indeed
when expired this timer is going to be checked at least twice by
etimer_process function and the tcpip eventhandler function. Thus the
final uip_ds6_periodic callback is never called.

The fix consists in adding a expired field in the timer struct and
make timer_expired retain the nano_timer_test result when the timer
has expired.

Change-Id: I3c6aceaa0627be264b6d9913b629e7b619888938
Signed-off-by: Sebastien Griffoul <sebastien.griffoul@intel.com>
2016-05-04 13:37:10 +00:00
..
dev net: Enable TCP support 2016-04-25 09:40:32 +03:00
lib
sys net: timer_expired may not return the right value when called twice 2016-05-04 13:37:10 +00:00
rtimer-arch.h net: License information was missing 2016-03-01 16:58:32 +00:00