kernel: Init back pointer to microkernel task
Fibers initialize this back pointer to NULL as they are (by definition) not microkernel tasks. Microkernel tasks initialize it to their corresponding 'ktask_t'. However for nanokernel systems, the back pointer is always NULL. This is because there is only one task in a nanokernel system (the background task) and it can not pend on a nanokernel object--it must poll. Change-Id: I9840fecc44224bef63d09d587d703720cf33ad57 Signed-off-by: Peter Mitsis <peter.mitsis@windriver.com>
This commit is contained in:
parent
8a33d98811
commit
b58878bb89
8 changed files with 51 additions and 11 deletions
|
@ -101,7 +101,8 @@ static ALWAYS_INLINE void thread_monitor_init(struct tcs *tcs)
|
|||
*
|
||||
* @return N/A
|
||||
*/
|
||||
void _new_thread(char *pStackMem, unsigned stackSize, _thread_entry_t pEntry,
|
||||
void _new_thread(char *pStackMem, unsigned stackSize,
|
||||
void *uk_task_ptr, _thread_entry_t pEntry,
|
||||
void *parameter1, void *parameter2, void *parameter3,
|
||||
int priority, unsigned options)
|
||||
{
|
||||
|
@ -154,6 +155,13 @@ void _new_thread(char *pStackMem, unsigned stackSize, _thread_entry_t pEntry,
|
|||
*/
|
||||
tcs->entry = (struct __thread_entry *)(pInitCtx);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MICROKERNEL
|
||||
tcs->uk_task_ptr = uk_task_ptr;
|
||||
#else
|
||||
ARG_UNUSED(uk_task_ptr);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* intlock_key is constructed based on ARCv2 ISA Programmer's
|
||||
* Reference Manual CLRI instruction description:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue