ChibiOS
21.6.0
chinstances.h
Go to the documentation of this file.
1
/*
2
ChibiOS - Copyright (C) 2006,2007,2008,2009,2010,2011,2012,2013,2014,
3
2015,2016,2017,2018,2019,2020,2021 Giovanni Di Sirio.
4
5
This file is part of ChibiOS.
6
7
ChibiOS is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation version 3 of the License.
10
11
ChibiOS is distributed in the hope that it will be useful,
12
but WITHOUT ANY WARRANTY; without even the implied warranty of
13
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
GNU General Public License for more details.
15
16
You should have received a copy of the GNU General Public License
17
along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
/**
21
* @file rt/include/chinstances.h
22
* @brief OS instances macros and structures.
23
*
24
* @addtogroup instances
25
* @{
26
*/
27
28
#ifndef CHINSTANCES_H
29
#define CHINSTANCES_H
30
31
/*===========================================================================*/
32
/* Module constants. */
33
/*===========================================================================*/
34
35
/*===========================================================================*/
36
/* Module pre-compile time settings. */
37
/*===========================================================================*/
38
39
/*===========================================================================*/
40
/* Derived constants and error checks. */
41
/*===========================================================================*/
42
43
/*===========================================================================*/
44
/* Module data structures and types. */
45
/*===========================================================================*/
46
47
/*===========================================================================*/
48
/* Module macros. */
49
/*===========================================================================*/
50
51
/**
52
* @brief Current thread pointer get macro.
53
* @note This macro is not meant to be used in the application code but
54
* only from within the kernel, use @p chThdGetSelfX() instead.
55
*/
56
#define __instance_get_currthread(oip) (oip)->rlist.current
57
58
/**
59
* @brief Current thread pointer set macro.
60
*/
61
#define __instance_set_currthread(oip, tp) (oip)->rlist.current = (tp)
62
63
/*===========================================================================*/
64
/* External declarations. */
65
/*===========================================================================*/
66
67
/*
68
* Scheduler APIs.
69
*/
70
#ifdef __cplusplus
71
extern
"C"
{
72
#endif
73
void
chInstanceObjectInit
(
os_instance_t
*oip,
74
const
os_instance_config_t
*oicp);
75
#ifdef __cplusplus
76
}
77
#endif
78
79
/*===========================================================================*/
80
/* Module inline functions. */
81
/*===========================================================================*/
82
83
#endif
/* CHINSTANCES_H */
84
85
/** @} */
ch_os_instance
System instance data structure.
Definition:
chobjects.h:394
chInstanceObjectInit
void chInstanceObjectInit(os_instance_t *oip, const os_instance_config_t *oicp)
Initializes a system instance.
Definition:
chinstances.c:89
ch_os_instance_config
Type of an system instance configuration.
Definition:
chobjects.h:363
home
giovanni
Projects
ChibiStudio
chibios_stable-21.6.x
os
rt
include
chinstances.h
Generated on Sun Jun 13 2021 16:13:02 for ChibiOS by
1.8.17