diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2016-07-11 17:21:32 +0900 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2016-07-11 17:21:32 +0900 |
commit | 08cca6b9f8d7d3253868be758deef9280fc949c5 (patch) | |
tree | daab7c8c552aeada6420b4cc15e7feb758ad1e0f /example-led | |
parent | c9d59a3f3fe340909e08bbdeaca191f56c682ce7 (diff) |
stackaddr/size change
Diffstat (limited to 'example-led')
-rw-r--r-- | example-led/sample.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/example-led/sample.c b/example-led/sample.c index d8a9ac6..f346676 100644 --- a/example-led/sample.c +++ b/example-led/sample.c @@ -72,14 +72,14 @@ blk (void *arg) #define PRIO_BLK 2 #endif -extern uint8_t __process1_stack_base__, __process1_stack_size__; -extern uint8_t __process2_stack_base__, __process2_stack_size__; +extern uint8_t __process1_stack_base__[], __process1_stack_size__[]; +extern uint8_t __process2_stack_base__[], __process2_stack_size__[]; -const uint32_t __stackaddr_pwm = (uint32_t)&__process1_stack_base__; -const size_t __stacksize_pwm = (size_t)&__process1_stack_size__; +#define STACK_ADDR_PWM ((uint32_t)__process1_stack_base__) +#define STACK_SIZE_PWM ((uint32_t)__process1_stack_size__) -const uint32_t __stackaddr_blk = (uint32_t)&__process2_stack_base__; -const size_t __stacksize_blk = (size_t)&__process2_stack_size__; +#define STACK_ADDR_BLK ((uint32_t)__process2_stack_base__) +#define STACK_SIZE_BLK ((uint32_t)__process2_stack_size__) int @@ -94,8 +94,8 @@ main (int argc, const char *argv[]) m = 10; - chopstx_create (PRIO_PWM, __stackaddr_pwm, __stacksize_pwm, pwm, NULL); - chopstx_create (PRIO_BLK, __stackaddr_blk, __stacksize_blk, blk, NULL); + chopstx_create (PRIO_PWM, STACK_ADDR_PWM, STACK_SIZE_PWM, pwm, NULL); + chopstx_create (PRIO_BLK, STACK_ADDR_BLK, STACK_SIZE_BLK, blk, NULL); chopstx_usec_wait (200*1000); |