From 9e1d151f2f308c16ed542a7fa1ab0f0cf1e7a0fc Mon Sep 17 00:00:00 2001 From: Petri Savolainen Date: Tue, 30 Oct 2018 12:31:45 +0200 Subject: api: sched: odp_schedule_prio_t is an integer Change odp_schedule_prio_t from an implementation specific type to integer. Application needs to be able to calculate priority values between min/default/max, so the type cannot be abstract. Since type is used in slow path (queue creation), a fixed type does not harm performance. A fixed type helps in portability (ABI compatibility). Signed-off-by: Petri Savolainen Reviewed-by: Bill Fischofer Signed-off-by: Maxim Uvarov --- include/odp/api/abi-default/schedule_types.h | 2 -- include/odp/api/spec/schedule_types.h | 14 +++++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/odp/api/abi-default/schedule_types.h b/include/odp/api/abi-default/schedule_types.h index 31ee27f1a..e7258f0c7 100644 --- a/include/odp/api/abi-default/schedule_types.h +++ b/include/odp/api/abi-default/schedule_types.h @@ -21,8 +21,6 @@ extern "C" { * @{ */ -typedef int odp_schedule_prio_t; - #define ODP_SCHED_PRIO_HIGHEST 0 #define ODP_SCHED_PRIO_NORMAL 4 diff --git a/include/odp/api/spec/schedule_types.h b/include/odp/api/spec/schedule_types.h index 44eb663a2..24663f695 100644 --- a/include/odp/api/spec/schedule_types.h +++ b/include/odp/api/spec/schedule_types.h @@ -22,11 +22,6 @@ extern "C" { * @{ */ -/** - * @typedef odp_schedule_prio_t - * Scheduler priority level - */ - /** * @def ODP_SCHED_PRIO_HIGHEST * Highest scheduling priority @@ -136,6 +131,15 @@ extern "C" { * Predefined scheduler group of all control threads */ +/** + * Scheduling priority level + * + * Priority level is an integer value between odp_schedule_min_prio() and + * odp_schedule_max_prio(). Queues with a higher priority value are served with + * higher priority than queues with a lower priority value. + */ +typedef int odp_schedule_prio_t; + /** Scheduler parameters */ typedef struct odp_schedule_param_t { /** Priority level -- cgit v1.2.3