projects
/
model-checker.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7930d11
)
schedule: use STL 'queue' instead of 'list'
author
Brian Norris
<banorris@uci.edu>
Thu, 15 Mar 2012 18:12:44 +0000
(11:12 -0700)
committer
Brian Norris
<banorris@uci.edu>
Thu, 15 Mar 2012 18:12:44 +0000
(11:12 -0700)
schedule.cc
patch
|
blob
|
history
schedule.h
patch
|
blob
|
history
diff --git
a/schedule.cc
b/schedule.cc
index b9388287c05d6d6d6900aefa5c1eda61fcd22bab..0dae851abe0325fb058759c9d1d44b53cc612cf8 100644
(file)
--- a/
schedule.cc
+++ b/
schedule.cc
@@
-6,7
+6,7
@@
void DefaultScheduler::add_thread(struct thread *t)
{
DEBUG("thread %d\n", t->id);
void DefaultScheduler::add_thread(struct thread *t)
{
DEBUG("thread %d\n", t->id);
- queue.push
_back
(t);
+ queue.push(t);
}
struct thread *DefaultScheduler::next_thread(void)
}
struct thread *DefaultScheduler::next_thread(void)
@@
-15,7
+15,7
@@
struct thread *DefaultScheduler::next_thread(void)
return NULL;
current = queue.front();
return NULL;
current = queue.front();
- queue.pop
_front
();
+ queue.pop();
return current;
}
return current;
}
diff --git
a/schedule.h
b/schedule.h
index aa291ef8cd788872f14adce2f7199a6d3186f1de..8e306752da7a1c43d7e10f8fb106473eb6284636 100644
(file)
--- a/
schedule.h
+++ b/
schedule.h
@@
-1,7
+1,7
@@
#ifndef __SCHEDULE_H__
#define __SCHEDULE_H__
#ifndef __SCHEDULE_H__
#define __SCHEDULE_H__
-#include <
list
>
+#include <
queue
>
#include "libthreads.h"
#include "model.h"
#include "libthreads.h"
#include "model.h"
@@
-19,7
+19,7
@@
public:
struct thread * next_thread(void);
struct thread * get_current_thread(void);
private:
struct thread * next_thread(void);
struct thread * get_current_thread(void);
private:
- std::
list
<struct thread *> queue;
+ std::
queue
<struct thread *> queue;
struct thread *current;
};
struct thread *current;
};