From 3e738661108fb2a8e3474c6336c2a5c2668f82b6 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Sat, 21 Jan 2017 14:18:37 -0500 Subject: Add CPU mode asserts to kernel on blocking functions. This scourge finds it's way back in far too often. Right now, only defined for ARM. Have fun! Change-Id: Ib21be09ebf71dec10dc652a7a664779251f49644 --- firmware/export/system.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'firmware/export/system.h') diff --git a/firmware/export/system.h b/firmware/export/system.h index e83ee53d96..d33a35f6fa 100644 --- a/firmware/export/system.h +++ b/firmware/export/system.h @@ -204,6 +204,16 @@ enum { #include "bitswap.h" #include "rbendian.h" +#ifndef ASSERT_CPU_MODE +/* Very useful to have defined properly for your architecture */ +#define ASSERT_CPU_MODE(mode, rstatus...) \ + ({ (mode); rstatus; }) +#endif + +#ifndef CPU_MODE_THREAD_CONTEXT +#define CPU_MODE_THREAD_CONTEXT 0 +#endif + #ifndef BIT_N #define BIT_N(n) (1U << (n)) #endif -- cgit v1.2.3