xtensa: THREAD_MONITOR hooks for asm2
You'd this feature would be portable, but it's arch-specific. Initialize the CONFIG_THREAD_MONITOR stuff, placing the __thread_entry struct (which AFAICT is dead: nothing in the tree actually reads it) at the top of the stack. Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
7707fcfa51
commit
02b2fe1c9e
1 changed files with 9 additions and 0 deletions
|
@ -68,6 +68,15 @@ void _new_thread(struct k_thread *thread, k_thread_stack_t *stack, size_t sz,
|
||||||
|
|
||||||
_new_thread_init(thread, base, sz, prio, opts);
|
_new_thread_init(thread, base, sz, prio, opts);
|
||||||
|
|
||||||
|
#ifdef CONFIG_THREAD_MONITOR
|
||||||
|
top -= sizeof(struct __thread_entry);
|
||||||
|
thread->entry = (void *)top;
|
||||||
|
thread->entry->pEntry = entry;
|
||||||
|
|
||||||
|
thread_monitor_init(thread);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
thread->switch_handle = xtensa_init_stack((void *)top, entry,
|
thread->switch_handle = xtensa_init_stack((void *)top, entry,
|
||||||
p1, p2, p3);
|
p1, p2, p3);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue