diff mbox series

[API-NEXT,v6,1/4] api: std_types: add odp_percent_t data type

Message ID 1510754421-26137-2-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [API-NEXT,v6,1/4] api: std_types: add odp_percent_t data type | expand

Commit Message

Github ODP bot Nov. 15, 2017, 2 p.m. UTC
From: Balasubramanian Manoharan <bala.manoharan@linaro.org>


odp_percent_t is used to express values which are percentages

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@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: ba93e355ddf151215aa18b59cbfca08fe175fe65
 ** Merge commit sha: 1c3ff9a77c88059189428342ddcb563eaee2f74c
 **/
 include/odp/api/spec/std_types.h | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/include/odp/api/spec/std_types.h b/include/odp/api/spec/std_types.h
index ec6a6df6d..f5eddd285 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" {
@@ -32,6 +34,14 @@  extern "C" {
  */
 
 /**
+ * @typedef odp_percent_t
+ * 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;
+/**
  * @}
  */