projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Parse command-line options much earlier, so that thread_mlfqs is
[pintos-anon]
/
src
/
threads
/
thread.h
diff --git
a/src/threads/thread.h
b/src/threads/thread.h
index 2043d8dc86e251bbd8c0492aaabc8266e935c3b9..0039560018ddc942fb2f10002ddd4d94e3045b8c 100644
(file)
--- a/
src/threads/thread.h
+++ b/
src/threads/thread.h
@@
-20,9
+20,9
@@
typedef int tid_t;
#define TID_ERROR ((tid_t) -1) /* Error value for tid_t. */
/* Thread priorities. */
#define TID_ERROR ((tid_t) -1) /* Error value for tid_t. */
/* Thread priorities. */
-#define PRI_MIN 0 /*
High
est priority. */
+#define PRI_MIN 0 /*
Low
est priority. */
#define PRI_DEFAULT 31 /* Default priority. */
#define PRI_DEFAULT 31 /* Default priority. */
-#define PRI_MAX 63 /*
Low
est priority. */
+#define PRI_MAX 63 /*
High
est priority. */
/* A kernel thread or user process.
/* A kernel thread or user process.
@@
-101,6
+101,11
@@
struct thread
unsigned magic; /* Detects stack overflow. */
};
unsigned magic; /* Detects stack overflow. */
};
+/* If false (default), use round-robin scheduler.
+ If true, use multi-level feedback queue scheduler.
+ Controlled by kernel command-line option "-o mlfqs". */
+extern bool thread_mlfqs;
+
void thread_init (void);
void thread_start (void);
void thread_init (void);
void thread_start (void);