mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-11 12:28:27 +00:00
taskprocessor: Warn on unused result from pushing task.
Add attribute_warn_unused_result to ast_taskprocessor_push, ast_taskprocessor_push_local and ast_threadpool_push. This will help ensure we perform the necessary cleanup upon failure. Change-Id: I7e4079bd7b21cfe52fb431ea79e41314520c3f6d
This commit is contained in:
@@ -213,7 +213,8 @@ void *ast_taskprocessor_unreference(struct ast_taskprocessor *tps);
|
||||
* \retval -1 failure
|
||||
* \since 1.6.1
|
||||
*/
|
||||
int ast_taskprocessor_push(struct ast_taskprocessor *tps, int (*task_exe)(void *datap), void *datap);
|
||||
int ast_taskprocessor_push(struct ast_taskprocessor *tps, int (*task_exe)(void *datap), void *datap)
|
||||
attribute_warn_unused_result;
|
||||
|
||||
/*! \brief Local data parameter */
|
||||
struct ast_taskprocessor_local {
|
||||
@@ -239,7 +240,8 @@ struct ast_taskprocessor_local {
|
||||
* \since 12.0.0
|
||||
*/
|
||||
int ast_taskprocessor_push_local(struct ast_taskprocessor *tps,
|
||||
int (*task_exe)(struct ast_taskprocessor_local *local), void *datap);
|
||||
int (*task_exe)(struct ast_taskprocessor_local *local), void *datap)
|
||||
attribute_warn_unused_result;
|
||||
|
||||
/*!
|
||||
* \brief Indicate the taskprocessor is suspended.
|
||||
|
||||
@@ -186,7 +186,8 @@ void ast_threadpool_set_size(struct ast_threadpool *threadpool, unsigned int siz
|
||||
* \retval 0 success
|
||||
* \retval -1 failure
|
||||
*/
|
||||
int ast_threadpool_push(struct ast_threadpool *pool, int (*task)(void *data), void *data);
|
||||
int ast_threadpool_push(struct ast_threadpool *pool, int (*task)(void *data), void *data)
|
||||
attribute_warn_unused_result;
|
||||
|
||||
/*!
|
||||
* \brief Shut down a threadpool and destroy it
|
||||
|
||||
Reference in New Issue
Block a user