diff options
author | Jere Leppänen <jere.leppanen@nokia.com> | 2021-04-13 17:42:28 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2021-05-05 11:10:39 +0300 |
commit | a1d95ebee3269bb1105d7f769d68eedd9b783669 (patch) | |
tree | 4df642ebdea76b97fc51464cf1e702872642cbe5 /include/odp/api/spec/init.h | |
parent | 769982d958b5487d0f44edf0a8a2f0c15f613df0 (diff) |
api: introduce thread specific log function
The odp_log_thread_fn_set() API allows the caller to set a thread
specific log function. This log function is called to do output when
the thread calls other API functions.
Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'include/odp/api/spec/init.h')
-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 73fd3e2b3..09d94b4ed 100644 --- a/include/odp/api/spec/init.h +++ b/include/odp/api/spec/init.h @@ -333,6 +333,20 @@ int odp_term_local(void); int odp_term_global(odp_instance_t instance); /** + * Set thread specific log function + * + * By default, all ODP log writes use the global log function, which may be set + * as part of odp_init_t. Using this operation, an alternative ODP log function + * may be set for the calling thread. When set, ODP uses the thread specific log + * function for all log writes originating from ODP API calls made by the + * calling thread. Setting the log function to NULL causes the calling thread to + * use the global log function. + * + * @param func Log function + */ +void odp_log_thread_fn_set(odp_log_func_t func); + +/** * @} */ |