fix headers barfing when used in c++ programs
authorAndrew Waterman <waterman@eecs.berkeley.edu>
Wed, 23 May 2012 17:15:49 +0000 (10:15 -0700)
committerAndrew Waterman <waterman@eecs.berkeley.edu>
Wed, 23 May 2012 17:15:49 +0000 (10:15 -0700)
kern/include/ros/procinfo.h
user/parlib/include/riscv/vcore.h

index 676fea0..10fdf2a 100644 (file)
@@ -8,6 +8,7 @@
 #include <ros/resource.h>
 #include <ros/atomic.h>
 #include <ros/arch/arch.h>
+#include <string.h>
 
 #define PROCINFO_MAX_ARGP 32
 #define PROCINFO_ARGBUF_SIZE 3072
index 2f92702..a558054 100644 (file)
@@ -18,8 +18,9 @@
 #endif
 
 /* Register saves and restores happen in asm. */
+typedef void (*helper_fn)(struct user_trapframe*, struct preempt_data*, uint32_t);
 void __pop_ros_tf_regs(struct user_trapframe *tf, struct preempt_data* vcpd,
-                    uint32_t vcoreid, void* helper) __attribute__((noreturn));
+                    uint32_t vcoreid, helper_fn helper) __attribute__((noreturn));
 void __save_ros_tf_regs(struct user_trapframe *tf);
 
 /* Helper function that may handle notifications after re-enabling them. */
@@ -42,7 +43,7 @@ static void __pop_ros_tf_notifs_raw(struct user_trapframe *tf,
 }
 
 static inline void __pop_ros_tf(struct user_trapframe *tf, uint32_t vcoreid,
-                                void* helper)
+                                helper_fn helper)
 {
        // since we're changing the stack, move stuff into regs for now
        register uint32_t _vcoreid = vcoreid;