IMGJulian commented on a change in pull request #474: PIC32: Fix stack align URL: https://github.com/apache/mynewt-core/pull/474#discussion_r131606248
########## File path: kernel/os/include/os/arch/pic32/os/os_arch.h ########## @@ -38,7 +38,8 @@ typedef uint32_t os_sr_t; /* Stack type, aligned to a 32-bit word. */ #define OS_STACK_PATTERN (0xdeadbeef) -typedef uint32_t os_stack_t; +/* uint64_t in an attempt to get the stack 8 aligned */ +typedef uint64_t os_stack_t; Review comment: My first attempt at a fix for this did something similar (modifying the stack pointer in `os_arch_task_stack_init()`) but I didn't like that the user may end up with a slightly smaller stack than they specified. Let me know If you would rather I did this to fit in with the x86 sim port. In the meantime (or otherwise) I will probably implement Francois' excellent suggestion, it seems much nicer than using a `uint64_t` to me. `typedef uint32_t __attribute__((aligned(8))) os_stack_t;` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services