diff options
author | Matias Elo <matias.elo@nokia.com> | 2021-11-04 14:19:35 +0200 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2021-11-11 15:08:08 +0200 |
commit | 99adf8340f6a4576df1c22864dc741621081766c (patch) | |
tree | 1b0b115e0f8f1defcf0d90f949faa5b977750aae | |
parent | b11d6a36c721329be26267d90d7e883f61460e94 (diff) |
api: init: add function for reading current instance handle
Add odp_instance() function for reading the current ODP instance handle.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
-rw-r--r-- | include/odp/api/spec/init.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/odp/api/spec/init.h b/include/odp/api/spec/init.h index e42fef53c..69ca55767 100644 --- a/include/odp/api/spec/init.h +++ b/include/odp/api/spec/init.h @@ -356,6 +356,20 @@ int odp_term_global(odp_instance_t instance); void odp_log_thread_fn_set(odp_log_func_t func); /** + * Get instance handle + * + * A successful call outputs the calling thread's ODP instance handle. + * + * @param[out] instance Instance handle pointer for output + * + * @retval 0 on success + * @retval <0 on failure + * + * @see odp_init_global(), odp_init_local() + */ +int odp_instance(odp_instance_t *instance); + +/** * @} */ |