Fixing lingering syscall bug, warnings on compilation.
authorDavid Zhu <yuzhu@cs.berkeley.edu>
Mon, 10 Aug 2009 21:47:13 +0000 (14:47 -0700)
committerDavid Zhu <yuzhu@cs.berkeley.edu>
Mon, 10 Aug 2009 21:47:13 +0000 (14:47 -0700)
Buster was using syswrapper functions that assume 1 to 1 correspondance between
async desc and syscall desc, which is not the case for buster.

Possible removal of these wrapper functions as they are no longer needed.

kern/arch/i386/smp_boot.c
user/apps/roslib/measurements.c
user/roslib/src/syswrapper.c

index 20c479e..fd99737 100644 (file)
@@ -13,6 +13,7 @@
 #include <smp.h>
 #include <arch/console.h>
 #include <arch/apic.h>
+#include <timing.h>
 
 #include <atomic.h>
 #include <ros/error.h>
index 446f577..38a9d2a 100644 (file)
@@ -117,12 +117,14 @@ void buster_sync_wrapper(uint32_t iters, uint32_t num_writes, uint32_t flags)
 
 void buster_async_wrapper(uint32_t iters, uint32_t num_writes, uint32_t flags)
 {
-       async_desc_t *desc1;
+       async_desc_t desc1;
        async_rsp_t rsp1;
        for (int i = 0; i < iters; i++){
-               cache_buster_async(&desc1, num_writes, 0, flags);
+               syscall_desc_t* sys_desc = get_sys_desc(&desc1);
+               if (sys_desc != NULL)
+                       sys_cache_buster_async(sys_desc, num_writes, 0, flags); 
        }
-       waiton_async_call(desc1, &rsp1);
+       waiton_async_call(&desc1, &rsp1);
 }
 
 void buster_thruput_sync(uint32_t flags, char* text)
index 4742a30..9d24e0c 100644 (file)
@@ -25,6 +25,7 @@ void cache_buster(uint32_t num_writes, uint32_t num_pages, uint32_t flags)
        sys_cache_buster(num_writes, num_pages, flags);
 }
 
+// TODO: This function can really screw things up if not careful. still needed?
 error_t cache_buster_async(async_desc_t** desc, uint32_t num_writes,
                            uint32_t num_pages, uint32_t flags)
 {