rusEFI
The most advanced open source ECU
engine_controller_misc.cpp
Go to the documentation of this file.
1 /*
2  * @file engine_controller_misc.cpp
3  *
4  * @date Mar 22, 2020
5  * @author Andrey Belomutskiy, (c) 2012-2020
6  */
7 
8 #include "pch.h"
9 
10 static uint8_t nextThreadId = 0;
11 void threadInitHook(void* vtp) {
12  // No lock required, this is already under lock
13  auto tp = reinterpret_cast<thread_t*>(vtp);
14  tp->threadId = ++nextThreadId;
15 }
16 
17 #if ENABLE_PERF_TRACE
18 void irqEnterHook() {
20 }
21 
22 void irqExitHook() {
24 }
25 
28 }
29 
30 #else
31 void irqEnterHook() {}
32 void irqExitHook() {}
33 void contextSwitchHook() {}
34 #endif /* ENABLE_PERF_TRACE */
void irqExitHook()
static uint8_t nextThreadId
void irqEnterHook()
void contextSwitchHook()
void threadInitHook(void *vtp)
void perfEventInstantGlobal(PE event)
Definition: perf_trace.cpp:115
void perfEventBegin(PE event)
Definition: perf_trace.cpp:107
void perfEventEnd(PE event)
Definition: perf_trace.cpp:111
@ ContextSwitch
@ ISR