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:
Peter Mitsis 2016-02-23 11:36:43 -05:00 committed by Anas Nashif
commit b58878bb89
8 changed files with 51 additions and 11 deletions

View file

@ -206,6 +206,7 @@ static void start_task(struct k_task *X, void (*func)(void))
_new_thread((char *)X->workspace, /* pStackMem */
X->worksize, /* stackSize */
X, /* microkernel task pointer */
(_thread_entry_t)func, /* pEntry */
parameter1, /* parameter1 */
(void *)0, /* parameter2 */