diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-23 20:59:23 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2022-04-23 21:10:44 +0300 |
| commit | d4c420689b1872f6fb22f421dfd27704ee94951a (patch) | |
| tree | c3b1921c7bb1035edb7211e4547d3088dac80778 /common/timer.c | |
| parent | 38c7c94bcd131290dcbae110dfb33b0b78c99d90 (diff) | |
| download | kmi-d4c420689b1872f6fb22f421dfd27704ee94951a.tar.gz kmi-d4c420689b1872f6fb22f421dfd27704ee94951a.zip | |
ran clang-format
Diffstat (limited to 'common/timer.c')
| -rw-r--r-- | common/timer.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/common/timer.c b/common/timer.c index f35c983..2006a6c 100644 --- a/common/timer.c +++ b/common/timer.c @@ -7,7 +7,7 @@ #include <arch/cpu.h> static ticks_t ticks_per_sec = 0; -static struct sp_root cpu_timers[MAX_CPUS] = {0}; +static struct sp_root cpu_timers[MAX_CPUS] = { 0 }; static struct node_root node_root; struct timer_node { @@ -15,11 +15,9 @@ struct timer_node { struct timer timer; }; -#define timer_container(ptr)\ - container_of(ptr, struct timer_node, sp_n) +#define timer_container(ptr) container_of(ptr, struct timer_node, sp_n) -#define timer_node_container(ptr)\ - container_of(ptr, struct timer_node, timer) +#define timer_node_container(ptr) container_of(ptr, struct timer_node, timer) static struct sp_root *__cpu_timers() { @@ -61,7 +59,7 @@ static id_t __insert_timer(struct timer_node *ti) d = RIGHT; } } - + if (sp_root(root)) sp_insert(&sp_root(root), p, &ti->sp_n, d); else |
