diff mbox series

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

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

Commit Message

Github ODP bot Nov. 9, 2017, 6 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: d22c949cc466bf28de559855a1cb525740578137
 ** Merge commit sha: 0f3d27771374d5b525af19461f31d0e308b05874
 **/
 include/odp/api/spec/std_types.h                   | 7 +++++++
 platform/linux-generic/include/odp/api/std_types.h | 2 ++
 2 files changed, 9 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..97f5ad994 100644
--- a/include/odp/api/spec/std_types.h
+++ b/include/odp/api/spec/std_types.h
@@ -32,6 +32,13 @@  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.
+ */
+
+/**
  * @}
  */
 
diff --git a/platform/linux-generic/include/odp/api/std_types.h b/platform/linux-generic/include/odp/api/std_types.h
index b61f33f4c..2104db03d 100644
--- a/platform/linux-generic/include/odp/api/std_types.h
+++ b/platform/linux-generic/include/odp/api/std_types.h
@@ -29,6 +29,8 @@  extern "C" {
 
 typedef int odp_bool_t;
 
+typedef uint16_t odp_percent_t;
+
 /**
  * @}
  */