diff options
| author | klaar36 <klas.arvidsson@liu.se> | 2017-03-20 17:59:45 +0100 |
|---|---|---|
| committer | klaar36 <klas.arvidsson@liu.se> | 2017-03-20 17:59:45 +0100 |
| commit | f9003d89b17c039ab903f622580e61925e137523 (patch) | |
| tree | b46ab4f9745c96a78685ca29b6a18ed2531205d6 /src/lib | |
| parent | d9ae213323d0a036b7f3594de6822413a4c312c6 (diff) | |
| download | pintos-rs-f9003d89b17c039ab903f622580e61925e137523.tar.gz | |
added given files for standalone labs
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/kernel/list.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lib/kernel/list.c b/src/lib/kernel/list.c index e9993cb..8b02162 100644 --- a/src/lib/kernel/list.c +++ b/src/lib/kernel/list.c @@ -1,5 +1,11 @@ #include "list.h" +#ifdef PINTOS #include "../debug.h" +#else +#define UNUSED __attribute__ ((unused)) +#define ASSERT(...) assert(__VA_ARGS__) +#include <assert.h> +#endif /* Our doubly linked lists have two header elements: the "head" just before the first element and the "tail" just after the @@ -463,7 +469,7 @@ list_insert_ordered (struct list *list, struct list_elem *elem, for (e = list_begin (list); e != list_end (list); e = list_next (e)) if (less (elem, e, aux)) break; - return list_insert (e, elem); + list_insert (e, elem); } /* Iterates through LIST and removes all but the first in each |
