8885f880c6e4ff67bc1a25e639168c4115cff81a
[gnuk/neug.git] / src / stack-def.h
1 #ifdef GNU_LINUX_EMULATION
2 #define SIZE_1 4096
3 #define SIZE_2 4096
4 #define SIZE_3 4096
5 #else
6 #define SIZE_0 0x0140 /* Main */
7 #define SIZE_1 0x00c0 /* LED */
8 #define SIZE_2 0x0180 /* RNG */
9 #define SIZE_3 0x0140 /* USB */
10 #endif
11
12 #if defined(STACK_MAIN) && !defined(GNU_LINUX_EMULATION) 
13 /* Idle+Exception handlers */
14 char __main_stack_end__[0] __attribute__ ((section(".main_stack")));
15 char main_base[0x0080] __attribute__ ((section(".main_stack")));
16
17 /* Main program            */
18 char __process0_stack_end__[0] __attribute__ ((section(".process_stack.0")));
19 char process0_base[SIZE_0] __attribute__ ((section(".process_stack.0")));
20 #endif
21
22 /* First thread program    */
23 #if defined(STACK_PROCESS_1)
24 char process1_base[SIZE_1] __attribute__ ((section(".process_stack.1"))); 
25 #endif
26
27 /* Second thread program   */
28 #if defined(STACK_PROCESS_2)
29 char process2_base[SIZE_2] __attribute__ ((section(".process_stack.2")));
30 #endif
31
32 /* Third thread program    */
33 #if defined(STACK_PROCESS_3)
34 char process3_base[SIZE_3] __attribute__ ((section(".process_stack.3")));
35 #endif