From: Balasubramanian Manoharan <bala.manoha...@linaro.org> odp_percent_t is used to express values which are percentages
Signed-off-by: Balasubramanian Manoharan <bala.manoha...@linaro.org> --- /** Email created from pull request 277 (bala-manoharan:RED) ** https://github.com/Linaro/odp/pull/277 ** Patch: https://github.com/Linaro/odp/pull/277.patch ** Base sha: d4b364849c4abb4c71e0c5260e1a793ebb8dc97d ** Merge commit sha: 806896e052ccb172565d49630ce6033f4e6ec9cd **/ include/odp/api/spec/std_types.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/odp/api/spec/std_types.h b/include/odp/api/spec/std_types.h index ec6a6df6d..9b4f894de 100644 --- a/include/odp/api/spec/std_types.h +++ b/include/odp/api/spec/std_types.h @@ -15,6 +15,8 @@ #ifndef ODP_API_STD_TYPES_H_ #define ODP_API_STD_TYPES_H_ #include <odp/visibility_begin.h> +/* uint64_t, uint32_t, etc */ +#include <stdint.h> #ifdef __cplusplus extern "C" { @@ -31,6 +33,14 @@ extern "C" { * between e.g. different compilers. */ +/** + * Percentage type + * Use odp_percent_t for specifying fields that are percentages. It is a fixed + * point integer whose units are expressed as one-hundredth of a percent. + * Hence 100% is represented as integer value 10000. + */ +typedef uint32_t odp_percent_t; + /** * @} */