forked from ShuriZma/suyu
kernel: Fix build errors.
This commit is contained in:
parent
89a5ae92bd
commit
0a1449e04b
|
@ -1015,8 +1015,13 @@ ResultVal<std::shared_ptr<KThread>> KThread::Create(Core::System& system, Thread
|
||||||
|
|
||||||
std::shared_ptr<KThread> thread = std::make_shared<KThread>(kernel);
|
std::shared_ptr<KThread> thread = std::make_shared<KThread>(kernel);
|
||||||
|
|
||||||
thread->InitializeThread(thread.get(), entry_point, arg, stack_top, priority, processor_id,
|
if (const auto result =
|
||||||
owner_process, type_flags);
|
thread->InitializeThread(thread.get(), entry_point, arg, stack_top, priority,
|
||||||
|
processor_id, owner_process, type_flags);
|
||||||
|
result.IsError()) {
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
thread->name = name;
|
thread->name = name;
|
||||||
|
|
||||||
auto& scheduler = kernel.GlobalSchedulerContext();
|
auto& scheduler = kernel.GlobalSchedulerContext();
|
||||||
|
|
|
@ -117,14 +117,14 @@ struct KernelCore::Impl {
|
||||||
void InitializePhysicalCores() {
|
void InitializePhysicalCores() {
|
||||||
exclusive_monitor =
|
exclusive_monitor =
|
||||||
Core::MakeExclusiveMonitor(system.Memory(), Core::Hardware::NUM_CPU_CORES);
|
Core::MakeExclusiveMonitor(system.Memory(), Core::Hardware::NUM_CPU_CORES);
|
||||||
for (s32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
|
for (u32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
|
||||||
schedulers[i] = std::make_unique<Kernel::KScheduler>(system, i);
|
schedulers[i] = std::make_unique<Kernel::KScheduler>(system, i);
|
||||||
cores.emplace_back(i, system, *schedulers[i], interrupts);
|
cores.emplace_back(i, system, *schedulers[i], interrupts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeSchedulers() {
|
void InitializeSchedulers() {
|
||||||
for (s32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
|
for (u32 i = 0; i < Core::Hardware::NUM_CPU_CORES; i++) {
|
||||||
cores[i].Scheduler().Initialize();
|
cores[i].Scheduler().Initialize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue