libosmocore/src
Andreas Eversberg e8f05481ea Prevent poll() in select.c to timeout too early
Adjust osmo_timers_nearest_ms() to round up the remaining time.

Note that poll() has a granularity of 1 millisecond.

Previously, when rounding down the remaining time, osmo_select_main()
would return too early, before the nearest timer timed out.
Consequently, the main loop repeatedly called osmo_select_main() until
the timer actually timed out, resulting in excessive CPU usage.
By modifying osmo_timers_nearest_ms() to round up the remaining time,
we ensure accurate timeout calculations, preventing unnecessary CPU
consumption during the main loop.

The patch only applies to non-embedded version of libosmocore, because
the impact on embedded systems is not verified tested.

Related: OS#6339
Change-Id: I79de77c79af4d50d1eb9ca0c5417123ff760dca3
2024-01-30 12:06:58 +00:00
..
codec ecu: fix alignment of fr_ecu_state 2024-01-04 13:55:31 +01:00
coding coding: gsm0503_pdtch_decode(): implement USF decoding for CS1 2023-12-08 03:35:57 +07:00
core Prevent poll() in select.c to timeout too early 2024-01-30 12:06:58 +00:00
ctrl Bump version: 1.8.0.252-13c29 → 1.9.0 2023-09-12 13:15:54 +02:00
gb ns2: Improve code consistency 2023-12-14 01:12:26 +01:00
gsm gsup: Convert PDP-Type IE to PDP-Address IE 2024-01-20 00:31:28 +01:00
isdn isdn/v110_ta: avoid redundant .status_update_cb() calls 2024-01-25 09:09:24 +00:00
pseudotalloc pseudotalloc: add talloc_memdup(), use it in talloc_strdup() 2024-01-03 23:05:16 +00:00
sim libosmosim: Support Microsoft smart card discovery process 2023-11-28 22:50:01 +01:00
usb Fix all references to config.h 2023-01-18 19:04:36 +01:00
vty Revert "logging: add log level cache" 2024-01-09 16:37:05 +00:00
Makefile.am create libosmoisdn sub-library 2023-01-21 22:41:57 +01:00