ChibiOS
19.1.4
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
chcore.c
Go to the documentation of this file.
1
/*
2
ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio.
3
4
This file is part of ChibiOS.
5
6
ChibiOS is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 3 of the License, or
9
(at your option) any later version.
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 templates/chcore.c
22
* @brief Port related template code.
23
*
24
* @addtogroup port_core
25
* @details Non portable code templates.
26
* @{
27
*/
28
29
#include "ch.h"
30
31
/*===========================================================================*/
32
/* Module local definitions. */
33
/*===========================================================================*/
34
35
/*===========================================================================*/
36
/* Module exported variables. */
37
/*===========================================================================*/
38
39
/*===========================================================================*/
40
/* Module local types. */
41
/*===========================================================================*/
42
43
/*===========================================================================*/
44
/* Module local variables. */
45
/*===========================================================================*/
46
47
/*===========================================================================*/
48
/* Module local functions. */
49
/*===========================================================================*/
50
51
/*===========================================================================*/
52
/* Module exported functions. */
53
/*===========================================================================*/
54
55
/**
56
* @brief Port-related initialization code.
57
* @note This function is usually empty.
58
*/
59
void
_port_init
(
void
) {
60
}
61
62
/**
63
* @brief Performs a context switch between two threads.
64
* @details This is the most critical code in any port, this function
65
* is responsible for the context switch between 2 threads.
66
* @note The implementation of this code affects <b>directly</b> the context
67
* switch performance so optimize here as much as you can.
68
*
69
* @param[in] ntp the thread to be switched in
70
* @param[in] otp the thread to be switched out
71
*/
72
void
_port_switch
(
thread_t
*ntp,
thread_t
*otp) {
73
}
74
75
/** @} */
_port_init
void _port_init(void)
Port-related initialization code.
Definition:
chcore.c:59
_port_switch
void _port_switch(thread_t *ntp, thread_t *otp)
Performs a context switch between two threads.
Definition:
chcore.c:72
ch_thread
Structure representing a thread.
Definition:
chschd.h:153
home
giovanni
Projects
ChibiStudio
chibios_stable-19.1.x
os
common
ports
templates
chcore.c
Generated on Thu Apr 30 2020 11:58:20 for ChibiOS by
1.8.11