projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Turn off assertions when running in the kernel.
[pintos-anon]
/
src
/
threads
/
synch.h
diff --git
a/src/threads/synch.h
b/src/threads/synch.h
index c74ba6813455f102c6540feb8a433952508c32d5..ad8423891bad260215a77d0274dddfd75c960962 100644
(file)
--- a/
src/threads/synch.h
+++ b/
src/threads/synch.h
@@
-1,8
+1,8
@@
-#ifndef
HEADER
_SYNCH_H
-#define
HEADER_SYNCH_H 1
+#ifndef
THREADS
_SYNCH_H
+#define
THREADS_SYNCH_H
+#include <list.h>
#include <stdbool.h>
#include <stdbool.h>
-#include "lib/list.h"
/* A counting semaphore. */
struct semaphore
/* A counting semaphore. */
struct semaphore
@@
-21,7
+21,6
@@
void sema_self_test (void);
/* Lock. */
struct lock
{
/* Lock. */
struct lock
{
- char name[16]; /* Name (for debugging purposes only). */
struct thread *holder; /* Thread holding lock (for debugging). */
struct semaphore semaphore; /* Binary semaphore controlling access. */
};
struct thread *holder; /* Thread holding lock (for debugging). */
struct semaphore semaphore; /* Binary semaphore controlling access. */
};
@@
-45,4
+44,4
@@
void cond_signal (struct condition *, struct lock *);
void cond_broadcast (struct condition *, struct lock *);
const char *cond_name (const struct condition *);
void cond_broadcast (struct condition *, struct lock *);
const char *cond_name (const struct condition *);
-#endif /* synch.h */
+#endif /*
threads/
synch.h */