-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PATCH v8] api: init: add odp_log_fn_get() and odp_abort_fn_get() #2126
[PATCH v8] api: init: add odp_log_fn_get() and odp_abort_fn_get() #2126
Conversation
ec45da6
to
bcf5cbd
Compare
v2:
|
bcf5cbd
to
048a399
Compare
048a399
to
856a22f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor tweaks. Same comments for log and abort functions when applicable.
1e00be0
to
c0d5d16
Compare
All comments processed in v6. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first commit should disappear after a rebase and one minor comment but looks good otherwise.
test/validation/api/init/init_main.c
Outdated
/* Default log function is not NULL. */ | ||
odp_log_func_t log_fn_def = odp_log_fn_get(); | ||
|
||
CU_ASSERT(log_fn_def != NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check can now be fatal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In v7.
c0d5d16
to
97d2587
Compare
Added review tags in v7. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and approved all three API commits.
97d2587
to
26d813f
Compare
v8:
|
Add printf format check to odp_override_log() and odp_log_func_t declarations. If the application calls these functions, the arguments will be type-checked against the format string. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Add odp_log_fn_get() function, which returns the current log function. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Add odp_abort_fn_get() function, which returns the abort function. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
ODPH_LOG, when called with ODPH_LOG_ABORT level, does exactly the same thing as ODPH_ASSERT. Implement ODPH_ASSERT as a call to ODPH_LOG. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Implement new odp_log_fn_get() API function. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Use the log function returned by odp_log_fn_get(). This means that also helper logs go to the ODP log function, instead of being written directly to stderr. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Test that odp_log_fn_get() API function returns the currently set log function. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Implement new odp_abort_fn_get() API function. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Use the abort function returned by odp_abort_fn_get(). Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Test that odp_abort_fn_get() API function returns the currently set abort function. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Add a few details to the documentation of debug macros. Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com> Reviewed-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
No description provided.