nuttx/sched/wdog
ligd cb5bab34f1 wdog: always ticks++ when wd_start
Now we have CONFIG_USEC_PER_TICK, and for our timer system, all the calculation used 'tick'.
And all the timespec should change to 'tick' before use wd_start(), so USEC2TICK() can NOT be avoided.

Then there must be an 'less then one tick' loss.

One resolution:
ticks++ anyway when wd_start(). But this will caused time expired more a tick.

Another resolution:
Change the testcase, and allow the following logic:

t1 = current_time();
sleep(3);
t2 = current_time();

allow: t2 - t1 >= 3;
(original test must be: t2- t1 > 3)

The original test think the time must be elapse-ing, and the (t2 - t1) must bigger then 3,
but in our system, we use 'tick' as the minimal wdog unit, then there must a precision loss.

Now we choose first resolution.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-10 23:32:30 +08:00
..
CMakeLists.txt
Make.defs
wd_cancel.c wdog: add API wd_cancel_irq() support 2024-09-10 23:32:30 +08:00
wd_gettime.c sched/wdog: Refactor wdog module 2024-09-10 23:32:30 +08:00
wd_initialize.c sched/wdog: move g_wdtimernested to wd_start.c 2024-09-10 23:32:30 +08:00
wd_recover.c
wd_start.c wdog: always ticks++ when wd_start 2024-09-10 23:32:30 +08:00
wdog.h sched/wdog: move g_wdtimernested to wd_start.c 2024-09-10 23:32:30 +08:00