aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/thread_pool.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/charon/thread_pool.h')
-rw-r--r--Source/charon/thread_pool.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/Source/charon/thread_pool.h b/Source/charon/thread_pool.h
index 265dc011b..c5e8fa997 100644
--- a/Source/charon/thread_pool.h
+++ b/Source/charon/thread_pool.h
@@ -1,7 +1,7 @@
/**
* @file thread_pool.h
*
- * @brief Thread-pool with some threads processing the job_queue
+ * @brief Thread pool with some threads processing the job_queue
*
*/
@@ -28,7 +28,7 @@
#include "types.h"
/**
- * @brief A thread_pool contains a pool of threads processing the job queue
+ * @brief A thread_pool contains a pool of threads processing the job queue.
*
* Current implementation uses as many threads as specified in constructor.
* A more improved version would dynamically increase thread count if necessary...
@@ -37,20 +37,20 @@ typedef struct thread_pool_s thread_pool_t;
struct thread_pool_s {
/**
- * @brief return currently active threads
+ * @brief return currently instanciated threads
*
- * @param thread_pool thread_pool_t object
- * @param size [out] actual size of pool
- * @return SUCCESS Thread flagged for termination
+ * @param thread_pool thread_pool_t object
+ * @return size of thread pool
*/
- status_t (*get_pool_size) (thread_pool_t *thread_pool, size_t *pool_size);
+ size_t (*get_pool_size) (thread_pool_t *thread_pool);
/**
* @brief destroy pool
*
* sends cancellation request to all threads and AWAITS their termination.
*
* @param thread_pool thread_pool_t object
- * @return SUCCESS
+ * @return
+ * - SUCCESS in any case
*/
status_t (*destroy) (thread_pool_t *thread_pool);
};
@@ -58,9 +58,10 @@ struct thread_pool_s {
/**
* @brief Create the thread pool using using pool_size of threads
*
- * @param pool_size desired pool size
- * @return NULL when no thread could be created
- * thread_pool when one ore more threads could be created
+ * @param pool_size desired pool size
+ * @return
+ * - NULL if no threads could be created
+ * - thread_pool if one ore more threads could be instanciated
*/
thread_pool_t *thread_pool_create(size_t pool_size);