projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make interrupt.h names more regular.
[pintos-anon]
/
src
/
threads
/
thread.c
diff --git
a/src/threads/thread.c
b/src/threads/thread.c
index 540041d4d0c57eb476ff0d9eecd3c950913866a3..4b848038a0b9ac03c6a23a72a98a62178b88edb2 100644
(file)
--- a/
src/threads/thread.c
+++ b/
src/threads/thread.c
@@
-43,7
+43,7
@@
void schedule_tail (struct thread *prev);
void
thread_init (void)
{
void
thread_init (void)
{
- ASSERT (intr_get_level () == I
F
_OFF);
+ ASSERT (intr_get_level () == I
NTR
_OFF);
/* Initialize run queue. */
list_init (&run_queue);
/* Initialize run queue. */
list_init (&run_queue);
@@
-220,7
+220,7
@@
void
thread_yield (void)
{
struct thread *cur = thread_current ();
thread_yield (void)
{
struct thread *cur = thread_current ();
- enum i
f
_level old_level;
+ enum i
ntr
_level old_level;
ASSERT (!intr_context ());
ASSERT (!intr_context ());
@@
-237,7
+237,7
@@
void
thread_sleep (void)
{
ASSERT (!intr_context ());
thread_sleep (void)
{
ASSERT (!intr_context ());
- ASSERT (intr_get_level () == I
F
_OFF);
+ ASSERT (intr_get_level () == I
NTR
_OFF);
thread_current ()->status = THREAD_BLOCKED;
schedule ();
thread_current ()->status = THREAD_BLOCKED;
schedule ();
@@
-357,7
+357,7
@@
schedule_tail (struct thread *prev)
{
struct thread *cur = thread_current ();
{
struct thread *cur = thread_current ();
- ASSERT (intr_get_level () == I
F
_OFF);
+ ASSERT (intr_get_level () == I
NTR
_OFF);
cur->status = THREAD_RUNNING;
if (prev != NULL && prev->status == THREAD_DYING)
cur->status = THREAD_RUNNING;
if (prev != NULL && prev->status == THREAD_DYING)
@@
-378,7
+378,7
@@
schedule (void)
struct thread *cur = thread_current ();
struct thread *next = next_thread_to_run ();
struct thread *cur = thread_current ();
struct thread *next = next_thread_to_run ();
- ASSERT (intr_get_level () == I
F
_OFF);
+ ASSERT (intr_get_level () == I
NTR
_OFF);
ASSERT (cur->status != THREAD_RUNNING);
ASSERT (is_thread (next));
ASSERT (cur->status != THREAD_RUNNING);
ASSERT (is_thread (next));