kern: implement SvcSleepThread for ns > 0

This commit is contained in:
Michael Scire committed 2020-07-10 23:30:15 -07:00
1 parent f37eda6b86
commit ca9327a120
5 files changed
+79 -3

No files matched your search

@@ -122,8 +122,11 @@ namespace ams::kern {
static NOINLINE void OnThreadPriorityChanged(KThread *thread, s32 old_priority);
static NOINLINE void OnThreadAffinityMaskChanged(KThread *thread, const KAffinityMask &old_affinity, s32 old_core);
/* TODO: Yield operations */
static NOINLINE void RotateScheduledQueue(s32 priority, s32 core_id);
static NOINLINE void YieldWithoutCoreMigration();
static NOINLINE void YieldWithCoreMigration();
static NOINLINE void YieldToAnyThread();
private:
/* Instanced private API. */
void ScheduleImpl();
@@ -385,6 +385,8 @@ namespace ams::kern {
Result Run();
void Exit();
Result Sleep(s64 timeout);
ALWAYS_INLINE void *GetStackTop() const { return reinterpret_cast<StackParameters *>(this->kernel_stack_top) - 1; }
ALWAYS_INLINE void *GetKernelStackTop() const { return this->kernel_stack_top; }