diff options
author | Taras Kondratiuk <taras.kondratiuk@linaro.org> | 2014-12-18 13:19:38 +0200 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2014-12-18 16:38:21 +0300 |
commit | 2da50e616965e4b17bafa34897e99fd2f5645dc5 (patch) | |
tree | a7207af13332b3816b2d517a786918aded5e2dec /platform/linux-generic | |
parent | 72b7b11bc160e54666ef0706eb270e898627ba4f (diff) |
api: init: add a way to determine a last ODP thread termination
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic')
-rw-r--r-- | platform/linux-generic/include/api/odp_init.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/platform/linux-generic/include/api/odp_init.h b/platform/linux-generic/include/api/odp_init.h index 49f5e41f6..22ed88d98 100644 --- a/platform/linux-generic/include/api/odp_init.h +++ b/platform/linux-generic/include/api/odp_init.h @@ -82,6 +82,10 @@ int odp_init_global(odp_init_t *params, odp_platform_init_t *platform_params); * In general it calls the API modules terminate functions in the reverse order * to that which the module init functions were called during odp_init_global() * + * @note This function should be called by the last ODP thread. To simplify + * synchronization between threads odp_term_local() indicates by its return + * value if it was the last thread. + * * @warning The unwinding of HW resources to allow them to be re used without reseting * the device is a complex task that the application is expected to coordinate. * This api may have platform dependant implications. @@ -120,14 +124,14 @@ int odp_init_local(void); * odp_init_local() * * @sa odp_init_local() - * @sa odp_term_global() which is the final ODP call before exit of an application. + * @sa odp_term_global() should be called by the last ODP thread before exit + * of an application. * * @warning The unwinding of HW resources to allow them to be re used without reseting * the device is a complex task that the application is expected to coordinate. - * All threads must call this function before calling - * any other ODP API functions. * - * @retval 0 if successful + * @retval 1 if successful and more ODP thread exists + * @retval 0 if successful and it was the last ODP thread * @retval -1 on failure */ int odp_term_local(void); |