diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2013-06-19 15:42:06 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2013-06-19 15:42:06 +0900 |
commit | d2819d14dbf70c09ef3b938849445105f11e189d (patch) | |
tree | 384abf4beea5be42764ee6c0de9c36847c81ff74 /entry.c | |
parent | 21d60dbec0c25bbac948779f3be9d5dc5708389f (diff) |
add CHOPSTX_THREAD_SIZE
Diffstat (limited to 'entry.c')
-rw-r--r-- | entry.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -28,6 +28,7 @@ #include <stdint.h> #include <stdlib.h> +#include <chopstx.h> #ifdef HAVE_SYS_H #define INLINE __attribute__ ((used)) @@ -246,6 +247,9 @@ static void none (void) { } +#define C_S_SUB(arg0, arg1, arg2) arg0 #arg1 arg2 +#define COMPOSE_STATEMENT(arg0,arg1,arg2) C_S_SUB (arg0, arg1, arg2) + /* * This routine only changes PSP and not MSP. */ @@ -276,7 +280,7 @@ void entry (void) "3:\n\t" /* Switch to PSP. */ "ldr r0, =__process0_stack_end__\n\t" - "sub r0, #60\n\t" /* Size of struct chx_thread. */ + COMPOSE_STATEMENT ("sub r0, #", CHOPSTX_THREAD_SIZE, "\n\t") "msr PSP, r0\n\t" /* Process (main routine) stack. */ "mov r1, #2\n\t" "msr CONTROL, r1\n\t" |