]> git.buserror.net Git - polintos/scott/priv.git/blobdiff - kernel/tests/aspace.cc
update
[polintos/scott/priv.git] / kernel / tests / aspace.cc
index 22ca29fae2ddaba83f954857b6d2b983721b824f..a8b53e682a37807843690290df112ae24900bb45 100644 (file)
 #include <kern/time.h>
 #include <kern/thread.h>
 #include <kern/mem.h>
+#include <kern/process.h>
 
 using namespace Mem;
 namespace Mem {
        extern IMappable physmem;
 }
 
-void thread(void *arg)
+void thread(void *arg1, void *arg2)
 {
        // Yuck -- out param->return value promotion would turn it into
        // AddrSpace aspace = AddrSpace::downcast(Mem::proc_addr_space_factory.create()),
@@ -56,7 +57,8 @@ void thread(void *arg)
               (void *)stacked[0], (void *)stacked[1],
               (void *)mappables[0], (void *)mappables[1]);
                
-       char *buf = new char[100000];
+//     char *buf = new char[100000];
+       char *buf = (char *)alloc_pages(25);
        printf("buf %p\n", buf);
        
        char *abuf = (char *)((((ulong)buf) + 4095) & ~4095);
@@ -147,5 +149,5 @@ void thread(void *arg)
 
 void run_test()
 {
-       Threads::sched.new_thread(thread, NULL, "thread")->wake();
+       Threads::sched.new_thread(thread, NULL, NULL, "thread")->wake();
 }