blob: 9cbf83d395c97d1eda60da3315bffdbe18ba9331 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#ifndef __KERNEL_SCHEDULER_H
#define __KERNEL_SCHEDULER_H
#include <kernel/types.h>
#include <kernel/spinlock.H>
#include <util/locked/queue.H>
#include <util/lockfree/stack.H>
class Scheduler
{
public:
friend class CpuManager;
void addTask(task_t*);
void returnRunnable();
void setNextRunnable();
protected:
Scheduler() :
iv_taskList() {};
~Scheduler() {};
private:
typedef Util::Locked::Queue<task_t, true, Spinlock> Runqueue_t;
Runqueue_t iv_taskList;
};
#endif
|