-
Notifications
You must be signed in to change notification settings - Fork 134
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 v4] api: std: clarify odp_bool_t documentation #2077
Conversation
@@ -22,7 +22,7 @@ extern "C" { | |||
* @{ | |||
*/ | |||
|
|||
typedef int odp_bool_t; | |||
typedef bool odp_bool_t; |
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 is not only for memory savings but to make the behavior comply with the clarified API when 64 bit values are assigned to an odp_bool (otherwise e.g. unsigned values with the low 32 bits zero (like 0x100000000) would get converted to zero). The commit message could mention this.
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.
Commit message improved in V2.
With a commit message improvement, Reviewed-by: Janne Peltonen janne.peltonen@nokia.com |
ecb6ad7
to
400b1cf
Compare
Match pktio_if_ops_t.promisc_mode_set() argument type (odp_bool_t) to the API function odp_pktio_promisc_mode_set(). Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Improve odp_bool_t documentation by stating how the data type can by used with standard C booleans and what is considered true/false. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com> Reviewed-by: Jerin Jacob <jerinj@marvell.com>
Change ABI type for odp_bool_t from int to bool to comply with the clarified API documentation. Otherwise for example unsigned values with all zero lowest 32 bits (e.g. 0x100000000) would get converted to zero. The change can also reduce memory usage. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Janne Peltonen <janne.peltonen@nokia.com> Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
400b1cf
to
479ad77
Compare
No description provided.