Skip to content

Commit

Permalink
linux-gen: schedule: rename config to get_config
Browse files Browse the repository at this point in the history
Rename config function to get_config to avoid collisions.

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 8e2b597 commit 265dbea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions platform/linux-generic/include/odp_schedule_if.h
Expand Up @@ -53,7 +53,7 @@ typedef void (*schedule_order_unlock_lock_fn_t)(void);
typedef void (*schedule_order_lock_start_fn_t)(void);
typedef void (*schedule_order_lock_wait_fn_t)(void);
typedef uint32_t (*schedule_max_ordered_locks_fn_t)(void);
typedef void (*schedule_config_fn_t)(schedule_config_t *config);
typedef void (*schedule_get_config_fn_t)(schedule_config_t *config);

typedef struct schedule_fn_t {
schedule_pktio_start_fn_t pktio_start;
Expand All @@ -74,7 +74,7 @@ typedef struct schedule_fn_t {
schedule_order_lock_wait_fn_t wait_order_lock;
schedule_order_unlock_lock_fn_t order_unlock_lock;
schedule_max_ordered_locks_fn_t max_ordered_locks;
schedule_config_fn_t config;
schedule_get_config_fn_t get_config;

} schedule_fn_t;

Expand Down
4 changes: 2 additions & 2 deletions platform/linux-generic/odp_schedule_basic.c
Expand Up @@ -1547,7 +1547,7 @@ static int schedule_num_grps(void)
return NUM_SCHED_GRPS;
}

static void schedule_config(schedule_config_t *config)
static void schedule_get_config(schedule_config_t *config)
{
*config = *(&sched->config_if);
};
Expand Down Expand Up @@ -1582,7 +1582,7 @@ const schedule_fn_t schedule_basic_fn = {
.order_lock = order_lock,
.order_unlock = order_unlock,
.max_ordered_locks = schedule_max_ordered_locks,
.config = schedule_config
.get_config = schedule_get_config
};

/* Fill in scheduler API calls */
Expand Down
8 changes: 4 additions & 4 deletions platform/linux-generic/odp_thread.c
Expand Up @@ -142,10 +142,10 @@ int odp_thread_init_local(odp_thread_type_t type)
group_worker = 1;
group_control = 1;

if (sched_fn->config) {
if (sched_fn->get_config) {
schedule_config_t schedule_config;

sched_fn->config(&schedule_config);
sched_fn->get_config(&schedule_config);
group_all = schedule_config.group_enable.all;
group_worker = schedule_config.group_enable.worker;
group_control = schedule_config.group_enable.control;
Expand Down Expand Up @@ -196,10 +196,10 @@ int odp_thread_term_local(void)
group_worker = 1;
group_control = 1;

if (sched_fn->config) {
if (sched_fn->get_config) {
schedule_config_t schedule_config;

sched_fn->config(&schedule_config);
sched_fn->get_config(&schedule_config);
group_all = schedule_config.group_enable.all;
group_worker = schedule_config.group_enable.worker;
group_control = schedule_config.group_enable.control;
Expand Down

0 comments on commit 265dbea

Please sign in to comment.