Minor touchups after rebase to make it work
authorKevin Klues <klueska@cs.berkeley.edu>
Tue, 26 May 2009 05:54:28 +0000 (22:54 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Wed, 27 May 2009 02:01:12 +0000 (19:01 -0700)
include/env.h
kern/src/Makefrag
kern/src/init.c
kern/src/manager.c
kern/src/workqueue.c
user/Makefrag
user/apps/roslib/Makefrag
user/roslib/ivy/Makefrag

index c814d77..d2bb9ca 100644 (file)
@@ -25,11 +25,11 @@ int envid2env(envid_t envid, env_t **env_store, bool checkperm);
 void   (IN_HANDLER env_run)(env_t *e) __attribute__((noreturn));
 void   env_pop_tf(trapframe_t *tf) __attribute__((noreturn));
 
-#define ENV_CREATE(x)                  ({              \
-       extern uint8_t _binary_obj_##x##_start[],       \
-               _binary_obj_##x##_size[];               \
-       env_create(_binary_obj_##x##_start,             \
-               (int)_binary_obj_##x##_size);           \
+#define ENV_CREATE(x)                  ({                                             \
+       extern uint8_t _binary_obj_user_apps_##x##_start[],                        \
+               _binary_obj_user_apps_##x##_size[];                                    \
+       env_create(_binary_obj_user_apps_##x##_start,                              \
+               (int)_binary_obj_user_apps_##x##_size);                                \
 })
 
 #endif // !ROS_KERN_ENV_H
index 6ccaee6..4ccd9ca 100644 (file)
@@ -39,9 +39,9 @@ KERN_SRCFILES := $(KERN_SRC_DIR)/entry.S \
 # Only build files if they exist.
 KERN_SRCFILES := $(wildcard $(KERN_SRCFILES))
 
-KERN_APPFILES :=       $(USER_APPS_ROSLIB_DIR)/hello \
-                    $(USER_APPS_PARLIB_DIR)/hello
-#                                      apps/null \
+KERN_APPFILES :=       $(USER_APPS_ROSLIB_DIR)/null \
+                                       $(USER_APPS_ROSLIB_DIR)/hello 
+#                   $(USER_APPS_PARLIB_DIR)/hello \
 #                                      apps/hello \
 #                                      apps_newlib/null \
 #                              apps/hello \
index d03e01c..c4b45c4 100644 (file)
@@ -26,7 +26,7 @@
 #include <testing.h>
 #include <syscall.h>
 #include <kclock.h>
-#include <kern/manager.h>
+#include <manager.h>
 
 static void print_cpuinfo(void);
 
index 61c5476..582f498 100644 (file)
@@ -7,15 +7,15 @@
 #pragma nodeputy
 #endif
 
-#include <inc/types.h>
-#include <inc/assert.h>
+#include <arch/types.h>
+#include <arch/apic.h>
+#include <arch/smp.h>
 
-#include <kern/manager.h>
-#include <kern/smp.h>
-#include <kern/env.h>
-#include <kern/apic.h>
-#include <kern/workqueue.h>
-#include <kern/syscall.h>
+#include <assert.h>
+#include <manager.h>
+#include <env.h>
+#include <workqueue.h>
+#include <syscall.h>
 
 /* Helper handlers for smp_call to dispatch jobs to other cores */
 static void work_env_run(void* data)
@@ -43,7 +43,7 @@ void manager(void)
        switch (progress++) {
                case 0:
                        for (int i = 2; i < 8; i++)
-                               env_batch[i] = ENV_CREATE(user_hello);
+                               env_batch[i] = ENV_CREATE(roslib_hello);
                        for (int i = 2; i < 8; i++)
                                smp_call_function_single(i, run_env_handler, env_batch[i], 0);
                        int count = 0;
@@ -59,7 +59,7 @@ void manager(void)
                        break; // only need this when planning to reenter manager
                case 1:
                        for (int i = 0; i < 4; i++)
-                               env_batch[i] = ENV_CREATE(user_null);
+                               env_batch[i] = ENV_CREATE(roslib_null);
                        for (int i = 0; i < 4; i++)
                                smp_call_function_single(i, run_env_handler, env_batch[i], 0);
                        //env_t* an_env = ENV_CREATE(user_null);
index 80bcd40..8adc62b 100644 (file)
@@ -3,11 +3,10 @@
  * See LICENSE for details.
  */
 
-#include <inc/x86.h>
-
-#include <kern/workqueue.h>
-#include <kern/apic.h>
-#include <kern/smp.h>
+#include <arch/x86.h>
+#include <arch/apic.h>
+#include <arch/smp.h>
+#include <workqueue.h>
 
 /*
  * TODO: actually use a queue, which will change some things all over.
index 4e6cf2f..c315162 100644 (file)
@@ -1,6 +1,6 @@
 USER_DIR = user
 
-USER_CFLAGS  := $(CFLAGS) -DROS_USER
+USER_CFLAGS  := $(CFLAGS) -DROS_USER -nostdinc
 USER_LDFLAGS :=
 
 # This is defined here because it is need by both
index 4a9477b..0faedab 100644 (file)
@@ -2,16 +2,15 @@ USER_APPS_ROSLIB_DIR = $(USER_APPS_DIR)/roslib
 OBJDIRS += $(USER_APPS_ROSLIB_DIR)
 
 USER_APPS_ROSLIB_CFLAGS    := $(USER_CFLAGS) -nostdinc \
-                              -I$(USER_ROSLIB_DIR)/inc \
-                              -I$(USER_ROSLIB_DIR)/inc/arch
+                              -I$(USER_ROSLIB_INCLUDE_DIR)
 USER_APPS_ROSLIB_LDFLAGS   := $(USER_LDFLAGS) -nostdlib -static \
                               -T $(USER_APPS_ROSLIB_DIR)/apps.ld
 USER_APPS_ROSLIB_LDDIRS    := -L$(OBJDIR)/$(USER_ROSLIB_DIR)
-USER_APPS_ROSLIB_LDLIBS    := -lroslib -livyroslib 
-USER_APPS_ROSLIB_LDOBJS    := $(OBJDIR)/$(USER_ROSLIB_DIR)/libivyroslib.a \
-                              $(OBJDIR)/$(USER_ROSLIB_DIR)/entry.o       
+USER_APPS_ROSLIB_LDLIBS    := -livyroslib -lroslib
+USER_APPS_ROSLIB_LDOBJS    := $(OBJDIR)/$(USER_ROSLIB_DIR)/entry.o \
+                              $(OBJDIR)/$(USER_ROSLIB_DIR)/libivyroslib.a \
+                              $(OBJDIR)/$(USER_ROSLIB_DIR)/libroslib.a 
 USER_APPS_ROSLIB_LDDEPENDS := $(USER_APPS_ROSLIB_LDOBJS) \
-                              $(OBJDIR)/$(USER_ROSLIB_DIR)/libroslib.a \
                               $(OBJDIR)/$(USER_APPS_ROSLIB_DIR)/%.o       
 USER_APPS_ROSLIB_GCC_LIB   := $(GCC_LIB)
 
index 7727a91..657b966 100644 (file)
@@ -3,7 +3,7 @@ NATIVECC := ivycc
 USER_ROSLIB_IVY_DIR := $(USER_ROSLIB_DIR)/ivy
 OBJDIRS += $(USER_ROSLIB_IVY_DIR)
 
-USER_ROSLIB_IVY_CFLAGS   := $(USER_CFLAGS) \
+USER_ROSLIB_IVY_CFLAGS   := $(USER_CFLAGS) -nostdinc \
                             -I$(USER_ROSLIB_INCLUDE_DIR)
 
 USER_ROSLIB_IVY_SRCFILES := $(USER_ROSLIB_IVY_DIR)/deputy.c