Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
thread_config.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2014-21 Freie Universität Berlin
3
* 2021 Inria
4
* 2021 Kaspar Schleiser <kaspar@schleiser.de>
5
*
6
* This file is subject to the terms and conditions of the GNU Lesser
7
* General Public License v2.1. See the file LICENSE in the top level
8
* directory for more details.
9
*/
10
11
#pragma once
12
24
#include "cpu_conf.h"
25
#include "
sched.h
"
/* for SCHED_PRIO_LEVELS */
26
27
#ifdef __cplusplus
28
extern
"C"
{
29
#endif
30
38
#ifndef THREAD_STACKSIZE_DEFAULT
39
#error THREAD_STACKSIZE_DEFAULT must be defined per CPU
40
#endif
41
#ifdef DOXYGEN
42
#define THREAD_STACKSIZE_DEFAULT
43
#endif
44
52
#ifndef THREAD_STACKSIZE_IDLE
53
#error THREAD_STACKSIZE_IDLE must be defined per CPU
54
#endif
55
#ifdef DOXYGEN
56
#define THREAD_STACKSIZE_IDLE
57
#endif
58
66
#ifndef THREAD_EXTRA_STACKSIZE_PRINTF
67
#error THREAD_EXTRA_STACKSIZE_PRINTF must be defined per CPU
68
#endif
69
#ifdef DOXYGEN
70
#define THREAD_EXTRA_STACKSIZE_PRINTF
71
#endif
72
77
#ifndef THREAD_STACKSIZE_MAIN
78
#define THREAD_STACKSIZE_MAIN (THREAD_STACKSIZE_DEFAULT + \
79
THREAD_EXTRA_STACKSIZE_PRINTF)
80
#endif
81
85
#ifndef THREAD_STACKSIZE_LARGE
86
#define THREAD_STACKSIZE_LARGE (THREAD_STACKSIZE_MEDIUM * 2)
87
#endif
88
92
#ifndef THREAD_STACKSIZE_MEDIUM
93
#define THREAD_STACKSIZE_MEDIUM THREAD_STACKSIZE_DEFAULT
94
#endif
95
99
#ifndef THREAD_STACKSIZE_SMALL
100
#define THREAD_STACKSIZE_SMALL (THREAD_STACKSIZE_MEDIUM / 2)
101
#endif
102
106
#ifndef THREAD_STACKSIZE_TINY
107
#define THREAD_STACKSIZE_TINY (THREAD_STACKSIZE_MEDIUM / 4)
108
#endif
109
113
#ifndef THREAD_STACKSIZE_MINIMUM
114
#define THREAD_STACKSIZE_MINIMUM (sizeof(thread_t))
115
#endif
116
121
#define THREAD_PRIORITY_MIN (SCHED_PRIO_LEVELS - 1)
122
127
#define THREAD_PRIORITY_IDLE (THREAD_PRIORITY_MIN)
128
133
#ifndef THREAD_PRIORITY_MAIN
134
#define THREAD_PRIORITY_MAIN (THREAD_PRIORITY_MIN - \
135
(SCHED_PRIO_LEVELS / 2))
136
#endif
137
138
#ifdef __cplusplus
139
}
140
#endif
141
sched.h
Scheduler API definition.
Generated on Fri Apr 18 2025 07:46:34 by
1.9.1