rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
os_util.h
Go to the documentation of this file.
1/*
2 * @file os_util.h
3 * @brief Number to string conversion header
4 *
5 * @date Nov 15, 2012
6 * @author Andrey Belomutskiy, (c) 2012-2020
7 */
8
9#pragma once
10
11#include "global.h"
12
13#if !EFI_UNIT_TEST
14
15#include "histogram.h"
16
17#ifdef _CHIBIOS_RT_CONF_VER_6_1_
18 #define ch0 ch
19#endif
20
21/**
22 * Unfortunately ChibiOS has two versions of methods for different
23 * contexts.
24 */
25#define isLocked() (ch0.dbg.lock_cnt > 0)
26#define isIsrContext() (ch0.dbg.isr_cnt > 0)
27
28#define assertIsrContext(code) efiAssertVoid(code, isIsrContext(), "NOT_ISR")
29
30void chVTSetAny(virtual_timer_t *vtp, systime_t time, vtfunc_t vtfunc, void *par);
31
32void printHistogram(Logging *logging, histogram_s *histogram);
33
34#endif /* EFI_UNIT_TEST */
This data structure is used to analyze CPU performance.
void printHistogram(Logging *logging, histogram_s *histogram)
This function knows how to print a histogram_s summary.
Definition efilib.cpp:150
void chVTSetAny(virtual_timer_t *vtp, systime_t time, vtfunc_t vtfunc, void *par)
Definition os_util.cpp:27