mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-29 04:08:46 +00:00
kern: mostly implement thread exit
This commit is contained in:
parent
c8f71007ec
commit
4a767c9082
8 changed files with 126 additions and 3 deletions
|
@ -147,6 +147,10 @@ namespace ams::kern {
|
|||
return this->is_suspended;
|
||||
}
|
||||
|
||||
bool EnterUserException();
|
||||
bool LeaveUserException();
|
||||
bool ReleaseUserException(KThread *thread);
|
||||
|
||||
KThread *GetPreemptionStatePinnedThread(s32 core_id) const {
|
||||
MESOSPHERE_ASSERT(0 <= core_id && core_id < static_cast<s32>(cpu::NumCores));
|
||||
return this->pinned_threads[core_id];
|
||||
|
@ -186,6 +190,14 @@ namespace ams::kern {
|
|||
void IncrementThreadCount();
|
||||
void DecrementThreadCount();
|
||||
|
||||
void ClearRunningThread(KThread *thread) {
|
||||
for (size_t i = 0; i < util::size(this->running_threads); ++i) {
|
||||
if (this->running_threads[i] == thread) {
|
||||
this->running_threads[i] = nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void RegisterThread(KThread *thread);
|
||||
void UnregisterThread(KThread *thread);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue