diff options
author | Bill Schwartz <whs@us.ibm.com> | 2012-10-10 10:36:29 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-10-12 16:29:17 -0500 |
commit | b201169eeae76a7697f4f207dd583d40a2f07f66 (patch) | |
tree | a05fa3da99dddab0491623aebc1110e73d430bf7 /src/include/usr/util | |
parent | 3536e96bd3a1d490cec900617fab6703fb7798ea (diff) | |
download | talos-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/usr/util')
-rw-r--r-- | src/include/usr/util/impl/threadpool.H | 46 | ||||
-rw-r--r-- | src/include/usr/util/threadpool.H | 51 |
2 files changed, 49 insertions, 48 deletions
diff --git a/src/include/usr/util/impl/threadpool.H b/src/include/usr/util/impl/threadpool.H index 8490bb5d6..fad1b8edc 100644 --- a/src/include/usr/util/impl/threadpool.H +++ b/src/include/usr/util/impl/threadpool.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/util/impl/threadpool.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 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 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/usr/util/impl/threadpool.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 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 */ #ifndef __UTIL_IMPL_THREADPOOL_H #define __UTIL_IMPL_THREADPOOL_H @@ -75,7 +75,7 @@ namespace __Util_ThreadPool_Impl worklist_itr_t; /** Typedef of function pointer passed to "start". */ - typedef void(*start_fn_t)(void*); + typedef void*(*start_fn_t)(void*); /** Typedef of function poitner passed to "remove". */ typedef worklist_itr_t(*order_fn_t)(worklist_itr_t, worklist_itr_t); diff --git a/src/include/usr/util/threadpool.H b/src/include/usr/util/threadpool.H index 4d28800fb..c04b7bede 100644 --- a/src/include/usr/util/threadpool.H +++ b/src/include/usr/util/threadpool.H @@ -1,25 +1,25 @@ -// IBM_PROLOG_BEGIN_TAG -// This is an automatically generated prolog. -// -// $Source: src/include/usr/util/threadpool.H $ -// -// IBM CONFIDENTIAL -// -// COPYRIGHT International Business Machines Corp. 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 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/usr/util/threadpool.H $ */ +/* */ +/* IBM CONFIDENTIAL */ +/* */ +/* COPYRIGHT International Business Machines Corp. 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 */ #ifndef __UTIL_THREADPOOL_H #define __UTIL_THREADPOOL_H @@ -116,7 +116,7 @@ class ThreadPool : public Util::__Util_ThreadPool_Impl::ThreadPoolImpl private: /** Entry point for worker thread. */ - static void run(ThreadPool*); + static void* run(ThreadPool*); /** Useful constant to determine FIFO vs non-FIFO behavior. */ static const bool has_comparison = Util::Traits::has_lessthan<WorkItem>::value; @@ -145,7 +145,7 @@ class ThreadPoolManager // Implementation of the worker-thread run function. template <typename WorkItem> -void ThreadPool<WorkItem>::run( +void* ThreadPool<WorkItem>::run( ThreadPool<WorkItem>* self) { while(1) @@ -168,9 +168,10 @@ void ThreadPool<WorkItem>::run( } else // No work item was given, we must be done. { - return; // task_end() called automatically by returning. + return NULL; // task_end() called automatically by returning. } } + return NULL; } }; |