projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make tests public. Rewrite most tests. Add tests.
[pintos-anon]
/
src
/
devices
/
intq.c
diff --git
a/src/devices/intq.c
b/src/devices/intq.c
index 8754c85034d2701d2a07f16dbd9cf48b76fe2673..028dca4272aee56836c64a68974e8cd4bf4ef5a4 100644
(file)
--- a/
src/devices/intq.c
+++ b/
src/devices/intq.c
@@
-6,12
+6,11
@@
static int next (int pos);
static void wait (struct intq *q, struct thread **waiter);
static void signal (struct intq *q, struct thread **waiter);
static void wait (struct intq *q, struct thread **waiter);
static void signal (struct intq *q, struct thread **waiter);
-/* Initializes interrupt queue Q, naming it NAME (for debugging
- purposes). */
+/* Initializes interrupt queue Q. */
void
void
-intq_init (struct intq *q
, const char *name
)
+intq_init (struct intq *q)
{
{
- lock_init (&q->lock
, name
);
+ lock_init (&q->lock);
q->not_full = q->not_empty = NULL;
q->head = q->tail = 0;
}
q->not_full = q->not_empty = NULL;
q->head = q->tail = 0;
}
@@
-87,7
+86,7
@@
next (int pos)
/* WAITER must be the address of Q's not_empty or not_full
member. Waits until the given condition is true. */
static void
/* WAITER must be the address of Q's not_empty or not_full
member. Waits until the given condition is true. */
static void
-wait (struct intq *q, struct thread **waiter)
+wait (struct intq *q
UNUSED
, struct thread **waiter)
{
ASSERT (!intr_context ());
ASSERT (intr_get_level () == INTR_OFF);
{
ASSERT (!intr_context ());
ASSERT (intr_get_level () == INTR_OFF);
@@
-103,7
+102,7
@@
wait (struct intq *q, struct thread **waiter)
thread is waiting for the condition, wakes it up and resets
the waiting thread. */
static void
thread is waiting for the condition, wakes it up and resets
the waiting thread. */
static void
-signal (struct intq *q, struct thread **waiter)
+signal (struct intq *q
UNUSED
, struct thread **waiter)
{
ASSERT (intr_get_level () == INTR_OFF);
ASSERT ((waiter == &q->not_empty && !intq_empty (q))
{
ASSERT (intr_get_level () == INTR_OFF);
ASSERT ((waiter == &q->not_empty && !intq_empty (q))