mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-08-29 23:55:21 +00:00
The sys_dlist_insert_*() functions had a behavior where a NULL argument for the insertion position to sys_dlist_insert_after/before() was interpreted as "the end of the list". We never used that convention (except in one spot internal to dlist.h which was not itself used anywhere), and of course already have an API for appending and prepending to a list. In practice this was a performance disaster. The NULL check is virtually never provable statically by the compiler, so that test and branch is present always. And worse, the check and call to another function was pushing this beyond the complexity limit for gcc to inline a function (at -Os optimization anyway), forcing us to use function calls for what should be a ~8 instruction sequence. The upshot is that dlist insertions were 2-3x slower than they needed to be. Deprecate these older APIs and introduce a new sys_dlist_insert() call which can be much better optimized. Signed-off-by: Andy Ross <andrew.j.ross@intel.com> |
||
---|---|---|
.. | ||
application_development | ||
benchmarks | ||
bluetooth | ||
boards | ||
booting/stub | ||
cmsis_rtos_v1 | ||
cmsis_rtos_v2 | ||
compliance | ||
coverage | ||
crypto | ||
drivers | ||
include | ||
kernel | ||
lib | ||
misc | ||
net | ||
posix | ||
shell | ||
subsys | ||
unit | ||
ztest | ||
CMakeLists.txt | ||
Kconfig |