X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=resource%2Fcsdk%2Fconnectivity%2Fcommon%2Finc%2Fcathreadpool.h;h=ef59413354e93d8480da21c08a31f1e5647ccaa8;hb=7f00f942c39b7bc27c7eeecf213a239c3fe4173c;hp=9df11e9221fece8cafafe5fd349a57d31345b10b;hpb=edcfc3d2329da7b914771c0dcff5f42c9b74fd93;p=platform%2Fupstream%2Fiotivity.git diff --git a/resource/csdk/connectivity/common/inc/cathreadpool.h b/resource/csdk/connectivity/common/inc/cathreadpool.h index 9df11e9..ef59413 100644 --- a/resource/csdk/connectivity/common/inc/cathreadpool.h +++ b/resource/csdk/connectivity/common/inc/cathreadpool.h @@ -67,12 +67,29 @@ CAResult_t ca_thread_pool_init(int32_t num_of_threads, ca_thread_pool_t *thread_ * @param thread_pool The thread pool structure. * @param method The routine to be executed. * @param data The data to be passed to the routine. + * @param taskId An unique identifier of task. * * @return CA_STATUS_OK on success. * @return Error on failure. */ -CAResult_t ca_thread_pool_add_task(ca_thread_pool_t thread_pool, ca_thread_func method, - void *data); +#ifndef __TIZENRT__ +CAResult_t ca_thread_pool_add_task(ca_thread_pool_t thread_pool, ca_thread_func method, void *data, + uint32_t *taskId); +#else +CAResult_t ca_thread_pool_add_task(ca_thread_pool_t thread_pool, ca_thread_func method, void *data, + uint32_t *taskId, const char *task_name, int stack_size); +#endif + +/** + * This function removes a routine to be executed by the thread pool. + * + * @param thread_pool The thread pool structure. + * @param taskId An unique identifier of task. + * + * @return CA_STATUS_OK on success. + * @return Error on failure. + */ +CAResult_t ca_thread_pool_remove_task(ca_thread_pool_t thread_pool, uint32_t taskId); /** * This function stops all the worker threads (stop & exit). And frees all the allocated memory.