Lazuli
sys
kern
sizeof_types.c
Go to the documentation of this file.
1
/*
2
* SPDX-License-Identifier: GPL-3.0-only
3
* This file is part of Lazuli.
4
*/
5
17
#include <
stdarg.h
>
18
19
#include <
Lazuli/clock_24.h
>
20
#include <
Lazuli/common.h
>
21
#include <
Lazuli/lazuli.h
>
22
#include <
Lazuli/mutex.h
>
23
#include <
Lazuli/spinlock.h
>
24
#include <
Lazuli/sys/scheduler.h
>
25
#include <
Lazuli/sys/task.h
>
26
33
#define SIZEOF_TYPE(T, M) \
34
const volatile size_t \
35
__sizeof_##T = sizeof(T); \
36
const volatile char * \
37
__message_##T = M
38
41
SIZEOF_TYPE
(
Clock24
,
42
"RAM needed for a Clock24."
);
43
44
SIZEOF_TYPE
(
Lz_Mutex
,
45
"RAM needed for an Lz_Mutex."
);
46
47
SIZEOF_TYPE
(
Lz_Spinlock
,
48
"RAM needed for an Lz_Spinlock."
);
49
50
SIZEOF_TYPE
(
Lz_TaskConfiguration
,
51
"RAM needed for Lz_TaskConfiguration."
);
52
53
SIZEOF_TYPE
(
Task
,
54
"RAM needed for a Task (base)."
);
55
56
SIZEOF_TYPE
(
TaskContextLayout
,
57
"RAM needed to save the context of a task."
);
58
59
SIZEOF_TYPE
(
u_read_write_atomic_t
,
60
"The size of u_read_write_atomic_t."
);
61
62
SIZEOF_TYPE
(va_list,
63
"The size of va_list."
);
64
clock_24.h
24-Hour clock user interface.
Clock24
Represents the type used to hold the time.
Definition:
clock_24.h:26
spinlock.h
Spinlocks interface.
lazuli.h
The public API of the Lazuli kernel.
scheduler.h
Lazuli scheduler interface.
SIZEOF_TYPE
#define SIZEOF_TYPE(T, M)
Declare a constant containing the size of a given type.
Definition:
sizeof_types.c:33
Lz_Spinlock
volatile uint8_t Lz_Spinlock
Type used to represent a spinlock.
Definition:
spinlock.h:26
Lz_TaskConfiguration
Represents the configuration of a task.
Definition:
lazuli.h:88
mutex.h
Mutexes interface.
stdarg.h
AVR type and macros definitions for variadic functions.
task.h
Base task definition and context description.
common.h
Basic type definitions and useful macros.
Lz_Mutex
Represents a mutex.
Definition:
mutex.h:28
Task
Represents a task.
Definition:
task.h:76
u_read_write_atomic_t
uint8_t u_read_write_atomic_t
Represents an unsigned integer that can be read and written atomically.
Definition:
common.h:107
TaskContextLayout
Represents the layout of the stack when saving the context of a task.
Definition:
task.h:203
Generated by
1.8.13