projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add copyright notice to synch.h.
[pintos-anon]
/
src
/
threads
/
thread.c
diff --git
a/src/threads/thread.c
b/src/threads/thread.c
index 52f0f8d4fc73d8f65818163aaca9c7229cf8e97e..61351b569add5a112f66f2210f9bb70989ced7c6 100644
(file)
--- a/
src/threads/thread.c
+++ b/
src/threads/thread.c
@@
-182,7
+182,7
@@
thread_unblock (struct thread *t)
old_level = intr_disable ();
if (t->status == THREAD_BLOCKED)
{
old_level = intr_disable ();
if (t->status == THREAD_BLOCKED)
{
- list_push_back (&run_queue, &t->
rq_
elem);
+ list_push_back (&run_queue, &t->elem);
t->status = THREAD_READY;
}
intr_set_level (old_level);
t->status = THREAD_READY;
}
intr_set_level (old_level);
@@
-241,7
+241,7
@@
thread_yield (void)
ASSERT (!intr_context ());
old_level = intr_disable ();
ASSERT (!intr_context ());
old_level = intr_disable ();
- list_push_back (&run_queue, &cur->
rq_
elem);
+ list_push_back (&run_queue, &cur->elem);
cur->status = THREAD_READY;
schedule ();
intr_set_level (old_level);
cur->status = THREAD_READY;
schedule ();
intr_set_level (old_level);
@@
-364,7
+364,7
@@
next_thread_to_run (void)
if (list_empty (&run_queue))
return idle_thread;
else
if (list_empty (&run_queue))
return idle_thread;
else
- return list_entry (list_pop_front (&run_queue), struct thread,
rq_
elem);
+ return list_entry (list_pop_front (&run_queue), struct thread, elem);
}
/* Destroys T, which must be in the dying state and must not be
}
/* Destroys T, which must be in the dying state and must not be