diff mbox series

[API-NEXT,v1,1/7] api: std_types: add odp_percent_t data type

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

Commit Message

Github ODP bot Nov. 6, 2017, 1 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: f8726f45026a85ce1dde794190c1eb35945dca3f
 **/
 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;
+
 /**
  * @}
  */