]> rtime.felk.cvut.cz Git - arc.git/blob - system/kernel/kernel_offset.c
More updates on OS configuration. Fixes on Scheduletables. Started on kernel testsyst...
[arc.git] / system / kernel / kernel_offset.c
1 /* -------------------------------- Arctic Core ------------------------------
2  * Arctic Core - the open source AUTOSAR platform http://arccore.com
3  *
4  * Copyright (C) 2009  ArcCore AB <contact@arccore.com>
5  *
6  * This source code is free software; you can redistribute it and/or modify it
7  * under the terms of the GNU General Public License version 2 as published by the
8  * Free Software Foundation; See <http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt>.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
13  * for more details.
14  * -------------------------------- Arctic Core ------------------------------*/
15
16 \r
17 #include <stddef.h>\r
18 \r
19 #define DECLARE(sym,val) \\r
20         __asm("#define " #sym " %0" : : "i" ((val)))\r
21 \r
22 #include "Os.h"
23 #include "kernel.h"\r
24 #include "pcb.h"\r
25 //#include "app_i.h"\r
26 #include "sys.h"\r
27 \r
28 \r
29 \r
30 void  oil_foo(void) {\r
31 \r
32         DECLARE(PCB_T_SIZE,                     sizeof(OsPcbType));
33 #if ( OS_SC3 == STD_ON ) || ( OS_SC4 == STD_ON )\r
34         DECLARE(APP_T_SIZE,                     sizeof(OsApplicationType));
35 #endif\r
36         DECLARE(PCB_STACK_CURR_P,       offsetof(OsPcbType, stack));
37         DECLARE(PCB_ENTRY_P,            offsetof(OsPcbType, entry));
38         DECLARE(SYS_CURR_PCB_P,         offsetof(sys_t, curr_pcb));
39         DECLARE(SYS_INT_NEST_CNT,       offsetof(sys_t, int_nest_cnt));
40         DECLARE(SYS_INT_STACK,          offsetof(sys_t, int_stack));
41 }\r
42 \r