Scheduler refactor Pt. 1
* Simplifies scheduling logic, specifically regarding thread status. It should be much clearer which statuses are valid for a thread at any given point in the system. * Removes dead code from thread.cpp. * Moves the implementation of resetting a ThreadContext to the corresponding core's implementation. Other changes: * Fixed comments in arm interfaces. * Updated comments in thread.cpp * Removed confusing, useless, functions like MakeReady() and ChangeStatus() from thread.cpp. * Removed stack_size from Thread. In the CTR kernel, the thread's stack would be allocated before thread creation.
This commit is contained in:
parent
848795f383
commit
5fcbfc06eb
7 changed files with 289 additions and 286 deletions
|
@ -85,6 +85,15 @@ public:
|
|||
*/
|
||||
virtual void AddTicks(u64 ticks) = 0;
|
||||
|
||||
/**
|
||||
* Initializes a CPU context for use on this CPU
|
||||
* @param context Thread context to reset
|
||||
* @param stack_top Pointer to the top of the stack
|
||||
* @param entry_point Entry point for execution
|
||||
* @param arg User argument for thread
|
||||
*/
|
||||
virtual void ResetContext(Core::ThreadContext& context, u32 stack_top, u32 entry_point, u32 arg) = 0;
|
||||
|
||||
/**
|
||||
* Saves the current CPU context
|
||||
* @param ctx Thread context to save
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue