diff options
| author | Grissiom <[email protected]> | 2013-09-26 15:52:02 +0800 |
|---|---|---|
| committer | Grissiom <[email protected]> | 2013-10-12 22:48:29 +0800 |
| commit | d59aa279c37b7aba07385a3a2cb3057bce6c5fea (patch) | |
| tree | f31c60b9e357c6c0f62485069ffad7fa52315868 /examples/kernel/thread_delete.c | |
| parent | 83bb05419f7aba80f6a10a48f88a2838a356737a (diff) | |
kernel: use skip list to implement timer list
Skip list is a "random" data structure that in high possibilities it
would get O(log(N)) time complexity in inserting while the old list get
O(N). Forthermore, when set RT_TIMER_SKIP_LIST_LEVEL to 1, it will just
the same as the old double linked list, both in time and space
complexity.
Benchmarks shows that when RT_TIMER_SKIP_LIST_LEVEL is 3, the average
time of random insertion of new timer is about 2 times faster than the
old timer when there are 100 timers and 3 times faster when there are
200 timers.
However, it restores the deprecated funcion rt_system_timer_init. BSPs
must invoke it upon system startup.
Diffstat (limited to 'examples/kernel/thread_delete.c')
0 files changed, 0 insertions, 0 deletions
