|
NeKernel dev
|
USER_PROCESS scheduler class. The main class which you call to schedule user processes. More...
#include <UserProcessScheduler.h>
Public Member Functions | |
| UserProcessScheduler ()=default | |
| ~UserProcessScheduler () override=default | |
| operator bool () | |
| this checks if any process is on the team. | |
| bool | operator! () |
| this checks if no process is on the team. | |
| UserProcessTeam & | TheCurrentTeam () |
| Gets the current scheduled team. | |
| BOOL | SwitchTeam (UserProcessTeam &team) |
| Switches the current team. | |
| ProcessID | Spawn (const Char *name, VoidPtr code, VoidPtr image) |
| Add process to team. | |
| Void | Remove (ProcessID process_id) |
| Remove process from the team. | |
| Bool | IsUser () override |
| Is it a user scheduler? | |
| Bool | IsKernel () override |
| Is it a kernel scheduler? | |
| Bool | HasMP () override |
| Is it a SMP scheduler? | |
| USER_PROCESS_REF & | TheCurrentProcess () |
| Gets current running process. | |
| SizeT | Run () |
| Run User scheduler object. | |
| STATIC UserProcessScheduler & | The () |
| Retrieves the singleton of the process scheduler. | |
| Public Member Functions inherited from Kernel::ISchedulable | |
| ISchedulable ()=default | |
| virtual | ~ISchedulable ()=default |
| ISchedulable & | operator= (const ISchedulable &)=default |
| ISchedulable (const ISchedulable &)=default | |
Private Attributes | |
| UserProcessTeam | mTeam {} |
Friends | |
| class | UserProcessHelper |
USER_PROCESS scheduler class. The main class which you call to schedule user processes.
|
explicitdefault |
|
overridedefault |
|
overridevirtual |
Is it a SMP scheduler?
Reimplemented from Kernel::ISchedulable.
|
overridevirtual |
Is it a kernel scheduler?
Reimplemented from Kernel::ISchedulable.
|
overridevirtual |
Is it a user scheduler?
Reimplemented from Kernel::ISchedulable.
|
explicit |
this checks if any process is on the team.
| Bool Kernel::UserProcessScheduler::operator! | ( | ) |
this checks if no process is on the team.
Remove process from the team.
| process_id | process slot inside team. |
| true | process was removed. |
| false | process doesn't exist in team. |
| SizeT Kernel::UserProcessScheduler::Run | ( | ) |
Run User scheduler object.
we store this guy to tell the scheduler how many things we have scheduled.
Check if the process needs to be run.
Increase the usage time of the process.
| BOOL Kernel::UserProcessScheduler::SwitchTeam | ( | UserProcessTeam & | team | ) |
Switches the current team.
| team | the new team to switch to. |
| true | team was switched. |
| false | team was not switched. |
| UserProcessScheduler & Kernel::UserProcessScheduler::The | ( | ) |
Retrieves the singleton of the process scheduler.
| Ref< USER_PROCESS > & Kernel::UserProcessScheduler::TheCurrentProcess | ( | ) |
Gets current running process.
| UserProcessTeam & Kernel::UserProcessScheduler::TheCurrentTeam | ( | ) |
Gets the current scheduled team.
|
friend |
|
private |