Skip to content

Commit

Permalink
api: queue, schedule: move scheduler capabilities to scheduler
Browse files Browse the repository at this point in the history
Add odp_schedule_capability() call to query scheduler capabilities. Move
basic scheduler capabilities to new odp_schedule_capability_t structure.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>
Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>
Reviewed-by: Petri Savolainen <petri.savolainen@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
  • Loading branch information
Dmitry Eremin-Solenikov authored and muvarov committed Nov 30, 2018
1 parent da73018 commit d3ff5e3
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 6 deletions.
15 changes: 9 additions & 6 deletions include/odp/api/spec/queue_types.h
Expand Up @@ -19,6 +19,7 @@ extern "C" {
#endif

#include <odp/api/schedule_types.h>
#include <odp/api/deprecated.h>

/** @addtogroup odp_queue
* @{
Expand Down Expand Up @@ -130,14 +131,16 @@ typedef struct odp_queue_capability_t {
* types are used simultaneously. */
uint32_t max_queues;

/** Maximum number of ordered locks per queue */
uint32_t max_ordered_locks;
/** @deprecated Use max_ordered_locks field of
* odp_schedule_capability_t instead */
uint32_t ODP_DEPRECATE(max_ordered_locks);

/** Maximum number of scheduling groups */
unsigned max_sched_groups;
/** @deprecated Use max_groups field of odp_schedule_capability_t
* instead */
unsigned int ODP_DEPRECATE(max_sched_groups);

/** Number of scheduling priorities */
unsigned sched_prios;
/** @deprecated Use prios field of odp_schedule_capability_t instead */
unsigned int ODP_DEPRECATE(sched_prios);

/** Plain queue capabilities */
struct {
Expand Down
12 changes: 12 additions & 0 deletions include/odp/api/spec/schedule.h
Expand Up @@ -257,6 +257,18 @@ int odp_schedule_default_prio(void);
*/
int odp_schedule_num_prio(void);

/**
* Query scheduler capabilities
*
* Outputs schedule capabilities on success.
*
* @param[out] capa Pointer to capability structure for output
*
* @retval 0 on success
* @retval <0 on failure
*/
int odp_schedule_capability(odp_schedule_capability_t *capa);

/**
* Schedule group create
*
Expand Down
15 changes: 15 additions & 0 deletions include/odp/api/spec/schedule_types.h
Expand Up @@ -165,6 +165,21 @@ typedef struct odp_schedule_param_t {
uint32_t lock_count;
} odp_schedule_param_t;

/**
* Scheduler capabilities
*/
typedef struct odp_schedule_capability_t {
/** Maximum number of ordered locks per queue */
uint32_t max_ordered_locks;

/** Maximum number of scheduling groups */
uint32_t max_groups;

/** Number of scheduling priorities */
uint32_t max_prios;

} odp_schedule_capability_t;

/**
* @}
*/
Expand Down

0 comments on commit d3ff5e3

Please sign in to comment.