changed harts interface for proxykernel compat
authorAndrew Waterman <waterman@r53.millennium.berkeley.edu>
Tue, 24 Nov 2009 23:38:05 +0000 (15:38 -0800)
committerAndrew Waterman <waterman@r53.millennium.berkeley.edu>
Tue, 24 Nov 2009 23:38:05 +0000 (15:38 -0800)
kern/arch/i386/ros/hart.h
kern/arch/sparc/ros/hart.h
user/parlib/inc/hart.h

index fbd0659..8bf3e45 100644 (file)
@@ -6,11 +6,11 @@
 #include <parlib.h>
 
 // The actual hart_self() function is a global symbol that invokes this routine.
-static inline size_t
+static inline int
 __hart_self()
 {
        // TODO: use some kind of thread-local storage to speed this up!
-       return (size_t)syscall(SYS_getvcoreid,0,0,0,0,0);
+       return (int)syscall(SYS_getvcoreid,0,0,0,0,0);
 }
 
 static inline void
index 83ccd0d..7df62f4 100644 (file)
@@ -1,12 +1,18 @@
 #ifndef _ROS_ARCH_HART_H
 #define _ROS_ARCH_HART_H
 
+#define __RAMP__
+double do_fdiv(double,double);
+double do_fsqrt(double);
+double do_recip(double);
+double do_rsqrt(double);
+
 #define HART_ALLOCATE_STACKS
 
-static inline size_t
+static inline int
 __hart_self()
 {
-       size_t id;
+       int id;
        asm volatile ("mov %%g6,%0" : "=r"(id));
        return id;
 }
index 7bd751a..22c74ae 100644 (file)
@@ -53,7 +53,7 @@ void hart_lock_init(hart_lock_t* lock);
 void hart_lock_unlock(hart_lock_t* lock);
 void hart_lock_lock(hart_lock_t* l);
 
-size_t hart_self();
+int hart_self();
 error_t hart_request(size_t k);
 void hart_yield();
 size_t hart_max_harts();