summaryrefslogtreecommitdiffstats
path: root/src/include/sys/task.h
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2011-06-16 11:22:46 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-06-20 11:45:44 -0500
commita1450c913cb7864234ae1adea8aaffe561a627d6 (patch)
tree936121c609a5c54782efbb6d23293ee7dc2500ee /src/include/sys/task.h
parentd38781779ba33ce8fb4d0ce562c0fb9283a1d63c (diff)
downloadblackbird-hostboot-a1450c913cb7864234ae1adea8aaffe561a627d6.tar.gz
blackbird-hostboot-a1450c913cb7864234ae1adea8aaffe561a627d6.zip
Set up initial task link-register to point to 'task_end' function.
Change-Id: Id1b122d789b84eebd75feb3bdb7e1ca222e6d76e Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/147 Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: Mark W. Wenning <wenning@us.ibm.com>
Diffstat (limited to 'src/include/sys/task.h')
-rw-r--r--src/include/sys/task.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/include/sys/task.h b/src/include/sys/task.h
index 265f175fb..901f938ea 100644
--- a/src/include/sys/task.h
+++ b/src/include/sys/task.h
@@ -36,9 +36,11 @@ tid_t task_create(void(*start_routine)(void*), void* arg);
*
* See POSIX pthread_exit.
*
- * @note A thread must call task_end when it wishes to exit. It is not
- * acceptable to simply return from the 'start_routine' and may result
- * in unexpected behavior.
+ * @note A task must call task_end when it wishes to exit. If a task were
+ * to simply return from its entry point function, the kernel sets up
+ * the initial task structure with the link-register pointing to this
+ * function. Therefore, returning from the entry point function will
+ * also cause the task to end cleanly using this function.
*/
void task_end();
OpenPOWER on IntegriCloud