Lazuli
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 
42  "RAM needed for a Clock24.");
43 
45  "RAM needed for an Lz_Mutex.");
46 
48  "RAM needed for an Lz_Spinlock.");
49 
51  "RAM needed for Lz_TaskConfiguration.");
52 
54  "RAM needed for a Task (base).");
55 
57  "RAM needed to save the context of a task.");
58 
60  "The size of u_read_write_atomic_t.");
61 
62 SIZEOF_TYPE(va_list,
63  "The size of va_list.");
64 
24-Hour clock user interface.
Represents the type used to hold the time.
Definition: clock_24.h:26
Spinlocks interface.
The public API of the Lazuli kernel.
Lazuli scheduler interface.
#define SIZEOF_TYPE(T, M)
Declare a constant containing the size of a given type.
Definition: sizeof_types.c:33
volatile uint8_t Lz_Spinlock
Type used to represent a spinlock.
Definition: spinlock.h:26
Represents the configuration of a task.
Definition: lazuli.h:88
Mutexes interface.
AVR type and macros definitions for variadic functions.
Base task definition and context description.
Basic type definitions and useful macros.
Represents a mutex.
Definition: mutex.h:28
Represents a task.
Definition: task.h:76
uint8_t u_read_write_atomic_t
Represents an unsigned integer that can be read and written atomically.
Definition: common.h:107
Represents the layout of the stack when saving the context of a task.
Definition: task.h:203