2020-06-23 23:43:56 +08:00
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
//
|
|
|
|
// Copyright(c) 2019 Intel Corporation. All rights reserved.
|
|
|
|
//
|
|
|
|
// Author: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
|
|
|
|
|
|
|
|
/* Generic scheduler */
|
|
|
|
#include <sof/schedule/schedule.h>
|
|
|
|
#include <sof/schedule/edf_schedule.h>
|
|
|
|
#include <sof/schedule/ll_schedule.h>
|
2022-09-03 00:42:05 +08:00
|
|
|
#include <rtos/alloc.h>
|
2021-04-30 22:59:29 +08:00
|
|
|
#include <sof/lib/cpu.h>
|
2020-06-23 23:43:56 +08:00
|
|
|
#include <ipc/topology.h>
|
|
|
|
|
2021-04-30 22:59:29 +08:00
|
|
|
static struct schedulers *_schedulers[CONFIG_CORE_COUNT];
|
2020-06-23 23:43:56 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Retrieves registered schedulers.
|
|
|
|
* @return List of registered schedulers.
|
|
|
|
*/
|
|
|
|
struct schedulers **arch_schedulers_get(void)
|
|
|
|
{
|
2021-04-30 22:59:29 +08:00
|
|
|
return _schedulers + cpu_get_id();
|
2020-06-23 23:43:56 +08:00
|
|
|
}
|