mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-18 00:54:23 -04:00
kern: fix missing scheduler updates in KLightLock/Exception, fix RequestScheduleOnInterrupt
This commit is contained in:
parent
920b017677
commit
e1bd6fb874
9 changed files with 64 additions and 56 deletions
|
@ -123,6 +123,20 @@ namespace ams::kern {
|
|||
|
||||
void StartTermination();
|
||||
void FinishTermination();
|
||||
|
||||
void PinThread(s32 core_id, KThread *thread) {
|
||||
MESOSPHERE_ASSERT(0 <= core_id && core_id < static_cast<s32>(cpu::NumCores));
|
||||
MESOSPHERE_ASSERT(thread != nullptr);
|
||||
MESOSPHERE_ASSERT(this->pinned_threads[core_id] == nullptr);
|
||||
this->pinned_threads[core_id] = thread;
|
||||
}
|
||||
|
||||
void UnpinThread(s32 core_id, KThread *thread) {
|
||||
MESOSPHERE_ASSERT(0 <= core_id && core_id < static_cast<s32>(cpu::NumCores));
|
||||
MESOSPHERE_ASSERT(thread != nullptr);
|
||||
MESOSPHERE_ASSERT(this->pinned_threads[core_id] == thread);
|
||||
this->pinned_threads[core_id] = nullptr;
|
||||
}
|
||||
public:
|
||||
KProcess() { /* ... */ }
|
||||
virtual ~KProcess() { /* ... */ }
|
||||
|
@ -207,20 +221,6 @@ namespace ams::kern {
|
|||
return this->pinned_threads[core_id];
|
||||
}
|
||||
|
||||
void PinThread(s32 core_id, KThread *thread) {
|
||||
MESOSPHERE_ASSERT(0 <= core_id && core_id < static_cast<s32>(cpu::NumCores));
|
||||
MESOSPHERE_ASSERT(thread != nullptr);
|
||||
MESOSPHERE_ASSERT(this->pinned_threads[core_id] == nullptr);
|
||||
this->pinned_threads[core_id] = thread;
|
||||
}
|
||||
|
||||
void UnpinThread(s32 core_id, KThread *thread) {
|
||||
MESOSPHERE_ASSERT(0 <= core_id && core_id < static_cast<s32>(cpu::NumCores));
|
||||
MESOSPHERE_ASSERT(thread != nullptr);
|
||||
MESOSPHERE_ASSERT(this->pinned_threads[core_id] == thread);
|
||||
this->pinned_threads[core_id] = nullptr;
|
||||
}
|
||||
|
||||
void CopySvcPermissionsTo(KThread::StackParameters &sp) {
|
||||
this->capabilities.CopySvcPermissionsTo(sp);
|
||||
}
|
||||
|
@ -327,6 +327,7 @@ namespace ams::kern {
|
|||
Result SetActivity(ams::svc::ProcessActivity activity);
|
||||
|
||||
void PinCurrentThread();
|
||||
void UnpinCurrentThread();
|
||||
|
||||
Result SignalToAddress(KProcessAddress address) {
|
||||
return this->cond_var.SignalToAddress(address);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue