diff options
Diffstat (limited to 'platform/linux-generic/odp_schedule_if.c')
-rw-r--r-- | platform/linux-generic/odp_schedule_if.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/linux-generic/odp_schedule_if.c b/platform/linux-generic/odp_schedule_if.c index 24307ab90..528c4065e 100644 --- a/platform/linux-generic/odp_schedule_if.c +++ b/platform/linux-generic/odp_schedule_if.c @@ -1,4 +1,5 @@ /* Copyright (c) 2016-2018, Linaro Limited + * Copyright (c) 2021, Nokia * All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause @@ -25,6 +26,7 @@ extern const schedule_api_t _odp_schedule_scalable_api; const schedule_fn_t *_odp_sched_fn; const schedule_api_t *_odp_sched_api; +int _odp_sched_id; uint64_t odp_schedule_wait_time(uint64_t ns) { @@ -216,12 +218,15 @@ int _odp_schedule_init_global(void) ODP_PRINT("Using scheduler '%s'\n", sched); if (!strcmp(sched, "basic")) { + _odp_sched_id = _ODP_SCHED_ID_BASIC; _odp_sched_fn = &_odp_schedule_basic_fn; _odp_sched_api = &_odp_schedule_basic_api; } else if (!strcmp(sched, "sp")) { + _odp_sched_id = _ODP_SCHED_ID_SP; _odp_sched_fn = &_odp_schedule_sp_fn; _odp_sched_api = &_odp_schedule_sp_api; } else if (!strcmp(sched, "scalable")) { + _odp_sched_id = _ODP_SCHED_ID_SCALABLE; _odp_sched_fn = &_odp_schedule_scalable_fn; _odp_sched_api = &_odp_schedule_scalable_api; } else { |