yushuailong
fb4ffa4ae7
drivers/timers: Fix non-atomic clock read in up_timer_gettime.
...
up_timer_gettime() computed tv_sec and tv_nsec from two separate calls
to current_usec(), which returns a free-running microsecond counter.
The counter advances between the two calls, so a read that straddles a
second boundary yields an inconsistent (possibly backwards) timespec.
Read current_usec() once into a local variable and derive both fields
from that single snapshot.
Signed-off-by: yushuailong <yyyusl@qq.com >
2026-06-17 17:12:04 +08:00
..
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-05-30 17:50:14 +08:00
2026-05-19 16:21:28 +08:00
2026-04-07 07:50:06 -03:00
2026-04-28 10:32:56 -03:00
2026-04-07 07:50:06 -03:00
2026-06-10 20:46:04 +02:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-05-28 22:21:47 +08:00
2026-05-28 22:21:47 +08:00
2026-05-28 22:21:47 +08:00
2026-06-17 17:11:26 +08:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-05-02 18:36:46 +08:00
2026-05-18 11:35:25 -04:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-05-19 16:21:28 +08:00
2026-06-11 03:18:31 +08:00
2026-04-07 07:50:06 -03:00
2026-05-28 22:21:47 +08:00
2026-06-10 21:51:31 +08:00
2026-05-29 09:43:20 +08:00
2026-05-19 16:21:28 +08:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-05-19 16:21:28 +08:00
2026-05-28 22:21:47 +08:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-05-30 17:49:03 +08:00
2026-05-21 06:28:36 +08:00
2026-06-10 22:40:26 +08:00
2026-06-10 20:45:31 +02:00
2026-06-10 22:04:35 +08:00
2026-05-28 22:21:47 +08:00
2026-05-19 16:21:28 +08:00
2026-04-07 07:50:06 -03:00
2026-06-17 17:12:04 +08:00
2026-04-07 07:50:06 -03:00
2026-05-22 10:38:25 +08:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-04-07 07:50:06 -03:00
2026-06-11 02:59:24 +08:00
2026-04-07 07:50:06 -03:00
2026-05-19 16:21:28 +08:00