projects
/
model-checker.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
691c6f43088595300ac198783328d4b102c8b0f4
[model-checker.git]
/
schedule.cc
1
#include "threads.h"
2
#include "schedule.h"
3
#include "common.h"
4
#include "model.h"
5
6
void Scheduler::add_thread(Thread *t)
7
{
8
DEBUG("thread %d\n", t->get_id());
9
queue.push(t);
10
}
11
12
Thread *Scheduler::next_thread(void)
13
{
14
if (queue.empty())
15
return NULL;
16
17
current = queue.front();
18
queue.pop();
19
20
return current;
21
}
22
23
Thread *Scheduler::get_current_thread(void)
24
{
25
return current;
26
}