projects
/
pintos-anon
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a little demo/test code for the `threads' project.
[pintos-anon]
/
src
/
threads
/
init.c
diff --git
a/src/threads/init.c
b/src/threads/init.c
index 729c25ffcd528957ea96e5f22cf2cf1a439d2cfb..589a23efc5b0ec779068052dcbbaaa136f036200 100644
(file)
--- a/
src/threads/init.c
+++ b/
src/threads/init.c
@@
-18,6
+18,7
@@
#include "threads/mmu.h"
#include "threads/paging.h"
#include "threads/palloc.h"
#include "threads/mmu.h"
#include "threads/paging.h"
#include "threads/palloc.h"
+#include "threads/test.h"
#include "threads/thread.h"
#ifdef USERPROG
#include "userprog/exception.h"
#include "threads/thread.h"
#ifdef USERPROG
#include "userprog/exception.h"
@@
-105,6
+106,8
@@
main (void)
printf ("\nExecuting '%s':\n", initial_program);
thread_execute (initial_program);
}
printf ("\nExecuting '%s':\n", initial_program);
thread_execute (initial_program);
}
+#else
+ test ();
#endif
/* Terminate this thread. */
#endif
/* Terminate this thread. */