rusefi/firmware/util/os_util.h

31 lines
654 B
C
Raw Normal View History

2015-07-10 06:01:56 -07:00
/*
* @file rfiutil.h
* @brief Number to string conversion header
*
* @date Nov 15, 2012
2020-01-13 18:57:43 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-07-10 06:01:56 -07:00
*/
2020-04-01 18:32:21 -07:00
#pragma once
2015-07-10 06:01:56 -07:00
#include "global.h"
2016-02-11 14:03:09 -08:00
#if !EFI_UNIT_TEST
2015-07-10 06:01:56 -07:00
#include "histogram.h"
2017-03-23 17:59:14 -07:00
/**
* Unfortunately ChibiOS has two versions of methods for different
* contexts.
*/
2017-03-22 16:16:45 -07:00
#define isLocked() (ch.dbg.lock_cnt > 0)
#define isIsrContext() (ch.dbg.isr_cnt > 0)
2015-07-10 06:01:56 -07:00
2018-09-10 19:24:50 -07:00
#define assertIsrContext(code) efiAssertVoid(code, isIsrContext(), "NOT_ISR")
2015-07-10 06:01:56 -07:00
void chVTSetAny(virtual_timer_t *vtp, systime_t time, vtfunc_t vtfunc, void *par);
void printHistogram(Logging *logging, histogram_s *histogram);
2016-02-11 14:03:09 -08:00
#endif /* EFI_UNIT_TEST */