Xtensa port: Added missing initalization of thread base sturct in _new_thread.
Change-Id: Icf9e1e6d5f831c2cf6e1262c6f8e1a46356edfe7 Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
This commit is contained in:
parent
2f4bec77d3
commit
7c75da1e1a
2 changed files with 15 additions and 3 deletions
|
@ -135,8 +135,21 @@ void _new_thread(char *pStack, size_t stackSize,
|
|||
#endif
|
||||
tcs->callee_saved.topOfStack = pInitCtx;
|
||||
tcs->arch.flags = 0;
|
||||
tcs->arch.prio = prio;
|
||||
|
||||
_init_thread_base(&tcs->base, prio, _THREAD_PRESTART, options);
|
||||
/* static threads overwrite it afterwards with real value */
|
||||
tcs->init_data = NULL;
|
||||
tcs->fn_abort = NULL;
|
||||
#ifdef CONFIG_THREAD_CUSTOM_DATA
|
||||
/* Initialize custom data field (value is opaque to kernel) */
|
||||
tcs->custom_data = NULL;
|
||||
#endif
|
||||
#ifdef CONFIG_THREAD_MONITOR
|
||||
/*
|
||||
* In debug mode tcs->entry give direct access to the thread entry
|
||||
* and the corresponding parameters.
|
||||
*/
|
||||
tcs->entry = (struct __thread_entry *)(pInitCtx);
|
||||
#endif
|
||||
/* initial values in all other registers/TCS entries are irrelevant */
|
||||
|
||||
THREAD_MONITOR_INIT(tcs);
|
||||
|
|
|
@ -134,7 +134,6 @@ struct _thread_arch {
|
|||
* offset to read the 'flags' field.
|
||||
*/
|
||||
uint32_t flags;
|
||||
int prio; /* thread priority used to sort linked list */
|
||||
#ifdef CONFIG_THREAD_CUSTOM_DATA
|
||||
void *custom_data; /* available for custom use */
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue