add vorgabe06
This commit is contained in:
35
c_os/kernel/threads/IdleThread.h
Executable file
35
c_os/kernel/threads/IdleThread.h
Executable file
@ -0,0 +1,35 @@
|
||||
/*****************************************************************************
|
||||
* *
|
||||
* I D L E T H R E A D *
|
||||
* *
|
||||
*---------------------------------------------------------------------------*
|
||||
* Beschreibung: Wird nur aktiviert, wenn kein Thread arbeiten moechte. *
|
||||
* *
|
||||
* Autor: Michael, Schoettner, HHU, 13.8.2016 *
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __IdleThread_include__
|
||||
#define __IdleThread_include__
|
||||
|
||||
|
||||
#include "kernel/threads/Thread.h"
|
||||
#include "kernel/Globals.h"
|
||||
|
||||
|
||||
class IdleThread : public Thread {
|
||||
|
||||
private:
|
||||
IdleThread(const Thread ©); // Verhindere Kopieren
|
||||
|
||||
public:
|
||||
IdleThread () : Thread () { }
|
||||
|
||||
void run () {
|
||||
while (1) {
|
||||
scheduler.yield ();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user