1

Cleanup Thread

This commit is contained in:
2022-12-08 20:18:12 +01:00
parent 01d5b76e6d
commit 32b1eecb50

View File

@ -1,21 +1,25 @@
#ifndef IdleThread_include__
#define IdleThread_include__
#include "kernel/system/Globals.h"
#include "Thread.h"
#include "kernel/service/SchedulerService.h"
#include "kernel/system/System.h"
#include "lib/util/RestrictedConstructors.h"
namespace Kernel {
class IdleThread : public Thread {
public:
IdleThread(const Thread &copy) = delete; // Verhindere Kopieren
IdleThread() {
tid = Thread::IDLE; // The IdleThread gets a fixed id for convenience
}
MakeUncopyable(IdleThread)
MakeUnmovable(IdleThread)
~IdleThread() override = default;
[[noreturn]] void run() override {
auto &schedulerService = Kernel::System::getService<Kernel::SchedulerService>();
while (true) {