MOS Source Code
Loading...
Searching...
No Matches
timer.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-3.0-or-later
2
3
#pragma once
4
5
#include "
mos/lib/structures/list.h
"
6
#include "
mos/platform/platform.h
"
7
8
typedef
struct
_ktimer
ktimer_t
;
9
10
typedef
bool
(*
timer_callback_t
)(
ktimer_t
*timer,
void
*arg);
11
12
typedef
struct
_ktimer
13
{
14
as_linked_list
;
15
u64
timeout
;
16
thread_t
*
thread
;
17
bool
ticked
;
18
timer_callback_t
callback
;
19
void
*
arg
;
20
}
ktimer_t
;
21
22
void
timer_tick
(
void
);
23
24
long
timer_msleep
(
u64
ms);
list.h
bool
int bool
Definition
pb_syshdr.h:57
platform.h
ktimer_t
Definition
timer.h:13
ktimer_t::thread
thread_t * thread
Definition
timer.h:16
ktimer_t::timeout
u64 timeout
Definition
timer.h:15
ktimer_t::as_linked_list
as_linked_list
Definition
timer.h:14
ktimer_t::callback
timer_callback_t callback
Definition
timer.h:18
ktimer_t::arg
void * arg
Definition
timer.h:19
ktimer_t::ticked
bool ticked
Definition
timer.h:17
thread_t
Definition
task_types.h:75
timer_msleep
long timer_msleep(u64 ms)
Definition
timer.c:39
timer_tick
void timer_tick(void)
Definition
timer.c:25
timer_callback_t
bool(* timer_callback_t)(ktimer_t *timer, void *arg)
Definition
timer.h:10
ktimer_t
struct _ktimer ktimer_t
Definition
timer.h:8
u64
unsigned long long u64
Definition
types.h:23
kernel
include
private
mos
device
timer.h
Generated on Sun Sep 1 2024 18:22:52 for MOS Source Code by
1.12.0