projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clarify description of "wait" syscall. Thanks to Evan Kutter
[pintos-anon]
/
src
/
threads
/
thread.c
diff --git
a/src/threads/thread.c
b/src/threads/thread.c
index 938d7f87d6b0b296e676ca971928a6ba0823fd27..f6768c0225432617c92c40e517a00f75f6fd72b9 100644
(file)
--- a/
src/threads/thread.c
+++ b/
src/threads/thread.c
@@
-52,9
+52,7
@@
static unsigned thread_ticks; /* # of timer ticks since last yield. */
/* If false (default), use round-robin scheduler.
If true, use multi-level feedback queue scheduler.
/* If false (default), use round-robin scheduler.
If true, use multi-level feedback queue scheduler.
- Controlled by kernel command-line options "-o mlfqs".
- Note that the command line is not parsed until well after
- thread_init() is called. */
+ Controlled by kernel command-line option "-o mlfqs". */
bool thread_mlfqs;
static void kernel_thread (thread_func *, void *aux);
bool thread_mlfqs;
static void kernel_thread (thread_func *, void *aux);
@@
-80,10
+78,6
@@
static tid_t allocate_tid (void);
allocator before trying to create any threads with
thread_create().
allocator before trying to create any threads with
thread_create().
- The kernel command line is not parsed until *after* this
- function returns, so that when this function runs,
- thread_mlfqs is always false.
-
It is not safe to call thread_current() until this function
finishes. */
void
It is not safe to call thread_current() until this function
finishes. */
void
@@
-102,10
+96,7
@@
thread_init (void)
}
/* Starts preemptive thread scheduling by enabling interrupts.
}
/* Starts preemptive thread scheduling by enabling interrupts.
- Also creates the idle thread.
-
- By the time this function runs, thread_mlfqs has been properly
- initialized to its final value. */
+ Also creates the idle thread. */
void
thread_start (void)
{
void
thread_start (void)
{
@@
-389,7
+380,7
@@
idle (void *idle_started_ UNUSED)
See [IA32-v2a] "HLT", [IA32-v2b] "STI", and [IA32-v3a]
7.11.1 "HLT Instruction". */
See [IA32-v2a] "HLT", [IA32-v2b] "STI", and [IA32-v3a]
7.11.1 "HLT Instruction". */
- asm
("sti; hlt
");
+ asm
volatile ("sti; hlt" : : : "memory
");
}
}
}
}