projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move problem 1-2 (join) into project 2 as the "wait" system call.
[pintos-anon]
/
src
/
threads
/
synch.c
diff --git
a/src/threads/synch.c
b/src/threads/synch.c
index a892454c8e9adf186c8189173d46c635b15e13e4..1504d98859f8b54cc6c6688f5ed1de3227cd97f8 100644
(file)
--- a/
src/threads/synch.c
+++ b/
src/threads/synch.c
@@
-192,8
+192,8
@@
lock_acquire (struct lock *lock)
/* Releases LOCK, which must be owned by the current thread.
An interrupt handler cannot acquire a lock, so it does not
/* Releases LOCK, which must be owned by the current thread.
An interrupt handler cannot acquire a lock, so it does not
- make sense to try to
signal a condition variable within an
-
interrupt
handler. */
+ make sense to try to
release a lock within an interrupt
+ handler. */
void
lock_release (struct lock *lock)
{
void
lock_release (struct lock *lock)
{
@@
-231,7
+231,7
@@
lock_name (const struct lock *lock)
/* One semaphore in a list. */
struct semaphore_elem
{
/* One semaphore in a list. */
struct semaphore_elem
{
-
list_elem elem;
/* List element. */
+
struct list_elem elem;
/* List element. */
struct semaphore semaphore; /* This semaphore. */
};
struct semaphore semaphore; /* This semaphore. */
};