projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Clean up threads.
[pintos-anon]
/
src
/
threads
/
synch.c
diff --git
a/src/threads/synch.c
b/src/threads/synch.c
index c3b46a8c7f675708cacd2d68d0b35c894480c5f6..b304244176ec6fc32c929bbfd691204370fb541f 100644
(file)
--- a/
src/threads/synch.c
+++ b/
src/threads/synch.c
@@
-70,8
+70,8
@@
sema_up (struct semaphore *sema)
old_level = intr_disable ();
if (!list_empty (&sema->waiters))
old_level = intr_disable ();
if (!list_empty (&sema->waiters))
- thread_
ready
(list_entry (list_pop_front (&sema->waiters),
-
struct thread_elem, elem)->thread);
+ thread_
wake
(list_entry (list_pop_front (&sema->waiters),
+ struct thread_elem, elem)->thread);
sema->value++;
intr_set_level (old_level);
}
sema->value++;
intr_set_level (old_level);
}