diff options
author | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-10-17 11:53:06 -0400 |
---|---|---|
committer | Benjamin Walsh <benjamin.walsh@windriver.com> | 2016-10-17 17:54:14 +0000 |
commit | fa078dea4b9c71a8527cc6ed6f313f210d0e34d0 (patch) | |
tree | 2c90f6999a5c16c3d2ecb907060a2b8b699fcce5 /samples/philosophers | |
parent | b2fd5be4dcad7e811c82182cb85a4a3883a50387 (diff) |
unified: fix philosophers demo when using stack objects
Got out of sync with the revised signature of k_stack_init().
Change-Id: Ib4c67c75f30055583a457bfb13f8dacc9929ee88
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
Diffstat (limited to 'samples/philosophers')
-rw-r--r-- | samples/philosophers/unified/src/phil_obj_abstract.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/samples/philosophers/unified/src/phil_obj_abstract.h b/samples/philosophers/unified/src/phil_obj_abstract.h index 48e0aec37..56025798b 100644 --- a/samples/philosophers/unified/src/phil_obj_abstract.h +++ b/samples/philosophers/unified/src/phil_obj_abstract.h @@ -87,10 +87,12 @@ #error "not implemented yet." #else typedef struct { - char stack_mem[K_STACK_SIZE(1)] __aligned(4); + struct k_stack stack; + uint32_t stack_mem[1]; } fork_obj_t; #define fork_init(x) do { \ - k_stack_init(x, 1); k_stack_push(x, MAGIC); \ + k_stack_init(x, (uint32_t *)((x) + 1), 1); \ + k_stack_push(x, MAGIC); \ } while ((0)) #endif #define take(x) do { \ |