]> rtime.felk.cvut.cz Git - arc.git/blob - include/generic/Cpu.h
EcuM/Mcu integration fixes
[arc.git] / include / generic / Cpu.h
1 /* -------------------------------- Arctic Core ------------------------------\r
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com\r
3  *\r
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>\r
5  *\r
6  * This source code is free software; you can redistribute it and/or modify it\r
7  * under the terms of the GNU General Public License version 2 as published by the\r
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.\r
9  *\r
10  * This program is distributed in the hope that it will be useful, but\r
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\r
13  * for more details.\r
14  * -------------------------------- Arctic Core ------------------------------*/\r
15 \r
16 \r
17 \r
18 #ifndef CPU_H\r
19 #define CPU_H\r
20 \r
21 #include "Std_Types.h"\r
22 typedef uint32_t imask_t;\r
23 \r
24 #define Irq_Save(flags)         ((flags) = 0)           // Dummy assignment to avoid compiler warnings\r
25 #define Irq_Restore(flags)      (void)(flags)\r
26 \r
27 #define Irq_Disable()\r
28 #define Irq_Enable()\r
29 \r
30 #define Irq_SuspendAll()        Irq_Disable()\r
31 #define Irq_ResumeAll()         Irq_Enable()\r
32 \r
33 #define Irq_SuspendOs()         Irq_Disable()\r
34 #define Irq_ResumeOs()          Irq_Enable()\r
35 \r
36 #define ilog2(_x)                       __builtin_ffs(_x)\r
37 \r
38 #endif /* CPU_H */\r