summaryrefslogtreecommitdiffstats
path: root/src/include/sys
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2012-10-10 10:36:29 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-10-12 16:29:17 -0500
commitb201169eeae76a7697f4f207dd583d40a2f07f66 (patch)
treea05fa3da99dddab0491623aebc1110e73d430bf7 /src/include/sys
parent3536e96bd3a1d490cec900617fab6703fb7798ea (diff)
downloadtalos-hostboot-b201169eeae76a7697f4f207dd583d40a2f07f66.tar.gz
talos-hostboot-b201169eeae76a7697f4f207dd583d40a2f07f66.zip
Memory Leak task_end
Change-Id: Idb7a2d8d72a55f644efd0b2548eca5df5d062e6d RTC: 47491 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2011 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/sys')
-rw-r--r--src/include/sys/task.h58
1 files changed, 31 insertions, 27 deletions
diff --git a/src/include/sys/task.h b/src/include/sys/task.h
index b86b6f4ec..0fbec617b 100644
--- a/src/include/sys/task.h
+++ b/src/include/sys/task.h
@@ -1,25 +1,25 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/sys/task.h $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2010 - 2011
-//
-// p1
-//
-// Object Code Only (OCO) source materials
-// Licensed Internal Code Source Materials
-// IBM HostBoot Licensed Internal Code
-//
-// The source code for this program is not published or other-
-// wise divested of its trade secrets, irrespective of what has
-// been deposited with the U.S. Copyright Office.
-//
-// Origin: 30
-//
-// IBM_PROLOG_END
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/include/sys/task.h $ */
+/* */
+/* IBM CONFIDENTIAL */
+/* */
+/* COPYRIGHT International Business Machines Corp. 2010,2012 */
+/* */
+/* p1 */
+/* */
+/* Object Code Only (OCO) source materials */
+/* Licensed Internal Code Source Materials */
+/* IBM HostBoot Licensed Internal Code */
+/* */
+/* The source code for this program is not published or otherwise */
+/* divested of its trade secrets, irrespective of what has been */
+/* deposited with the U.S. Copyright Office. */
+/* */
+/* Origin: 30 */
+/* */
+/* IBM_PROLOG_END_TAG */
/** @file task.h
* @brief Contains the prototypes for system calls related to tasking.
*/
@@ -52,23 +52,27 @@ void task_yield();
*
* See POSIX pthread_create.
*/
-tid_t task_create(void(*start_routine)(void*), void* arg);
+tid_t task_create(void*(*start_routine)(void*), void* arg);
/** @fn task_end
* @brief End the calling task.
*
* See POSIX pthread_exit.
*
- * @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
+ * @note A task could call task_end when it wishes to exit. But it will likely
+ * cause a memory leak. It is better for a task 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.
+ * function. The "NO_RETURN" does not call the destructors to clean up.
+ * Might be used in case of task needing to be terminated due to
+ * unknown cause.
*/
void task_end() NO_RETURN;
/** @fn task_end2
* @brief End the calling task with a return value.
+ * Will likely cause a memory leak. Better to return the value on the
+ * return to the entry point. See comments on task_end.
*
* See POSIX pthread_exit.
*
OpenPOWER on IntegriCloud