projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Comments and a bit of initialization order cleanup.
[pintos-anon]
/
src
/
threads
/
synch.c
diff --git
a/src/threads/synch.c
b/src/threads/synch.c
index 28696d471aecfc67bfffc243f3734b0dd34a09b2..85af57d63ac8c0f59f8b254c0d4db46f495d392b 100644
(file)
--- a/
src/threads/synch.c
+++ b/
src/threads/synch.c
@@
-162,7
+162,6
@@
lock_init (struct lock *lock, const char *name)
ASSERT (lock != NULL);
ASSERT (name != NULL);
ASSERT (lock != NULL);
ASSERT (name != NULL);
- strlcpy (lock->name, name, sizeof lock->name);
lock->holder = NULL;
sema_init (&lock->semaphore, 1, name);
}
lock->holder = NULL;
sema_init (&lock->semaphore, 1, name);
}
@@
-226,7
+225,7
@@
lock_name (const struct lock *lock)
{
ASSERT (lock != NULL);
{
ASSERT (lock != NULL);
- return
lock->name
;
+ return
sema_name (&lock->semaphore)
;
}
\f
/* One semaphore in a list. */
}
\f
/* One semaphore in a list. */