kern/KScheduler: implement special yields
This commit is contained in:
@@ -185,6 +185,8 @@ namespace ams::kern {
|
||||
constexpr KProcessAddress GetProcessLocalRegionAddress() const { return this->plr_address; }
|
||||
|
||||
void AddCpuTime(s64 diff) { this->cpu_time += diff; }
|
||||
|
||||
constexpr s64 GetScheduledCount() const { return this->schedule_count; }
|
||||
void IncrementScheduledCount() { ++this->schedule_count; }
|
||||
|
||||
void IncrementThreadCount();
|
||||
|
||||
@@ -349,6 +349,9 @@ namespace ams::kern {
|
||||
constexpr s64 GetLastScheduledTick() const { return this->last_scheduled_tick; }
|
||||
constexpr void SetLastScheduledTick(s64 tick) { this->last_scheduled_tick = tick; }
|
||||
|
||||
constexpr s64 GetYieldScheduleCount() const { return this->schedule_count; }
|
||||
constexpr void SetYieldScheduleCount(s64 count) { this->schedule_count = count; }
|
||||
|
||||
constexpr KProcess *GetOwnerProcess() const { return this->parent; }
|
||||
constexpr bool IsUserThread() const { return this->parent != nullptr; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user