MOS Source Code
Loading...
Searching...
No Matches
clocksource.c
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-3.0-or-later
2
4
5#include "mos/device/timer.h"
6
9
11{
12 clocksource->ticks = 0;
14 active_clocksource = clocksource;
15}
16
18{
19 clocksource->ticks++;
20 timer_tick();
21}
list_head clocksources
Definition clocksource.c:7
void clocksource_register(clocksource_t *clocksource)
Definition clocksource.c:10
clocksource_t * active_clocksource
Definition clocksource.c:8
void clocksource_tick(clocksource_t *clocksource)
Definition clocksource.c:17
#define LIST_HEAD_INIT(container)
Definition list.h:38
MOSAPI void list_node_append(list_node_t *head, list_node_t *item)
Definition list.c:68
#define list_node(element)
Get the ‘list_node’ of a list element. This is exactly the reverse of ‘list_entry’ above.
Definition list.h:68
list_node_t list_head
A linked list head.
Definition list.h:23
void timer_tick()
Definition timer.c:25