mirror of https://github.com/ARMmbed/mbed-os.git
backport of Issue: Fix stack aligment. #812
parent
c064a71ca7
commit
d41b74e898
|
|
@ -243,7 +243,7 @@ typedef struct os_thread_def {
|
||||||
os_pthread pthread; ///< start address of thread function
|
os_pthread pthread; ///< start address of thread function
|
||||||
osPriority tpriority; ///< initial thread priority
|
osPriority tpriority; ///< initial thread priority
|
||||||
uint32_t stacksize; ///< stack size requirements in bytes
|
uint32_t stacksize; ///< stack size requirements in bytes
|
||||||
unsigned char *stack_pointer; ///< pointer to the stack memory block
|
uint32_t *stack_pointer; ///< pointer to the stack memory block
|
||||||
struct OS_TCB tcb;
|
struct OS_TCB tcb;
|
||||||
} osThreadDef_t;
|
} osThreadDef_t;
|
||||||
|
|
||||||
|
|
@ -337,7 +337,7 @@ int32_t osKernelRunning(void);
|
||||||
extern osThreadDef_t os_thread_def_##name
|
extern osThreadDef_t os_thread_def_##name
|
||||||
#else // define the object
|
#else // define the object
|
||||||
#define osThreadDef(name, priority, stacksz) \
|
#define osThreadDef(name, priority, stacksz) \
|
||||||
unsigned char os_thread_def_stack_##name [stacksz] __attribute__((aligned (4))); \
|
uint32_t os_thread_def_stack_##name [stacksz / sizeof(uint32_t)]; \
|
||||||
osThreadDef_t os_thread_def_##name = \
|
osThreadDef_t os_thread_def_##name = \
|
||||||
{ (name), (priority), (stacksz), (os_thread_def_stack_##name)}
|
{ (name), (priority), (stacksz), (os_thread_def_stack_##name)}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue