Making tests compile even when arsc is not used.
authorDavid Zhu <yuzhu@cs.berkeley.edu>
Fri, 4 Feb 2011 23:31:26 +0000 (15:31 -0800)
committerKevin Klues <klueska@cs.berkeley.edu>
Thu, 3 Nov 2011 00:36:01 +0000 (17:36 -0700)
Converting arsc_server flag to be both user and kernel.

Makeconfig
tests/arsc_mt.c
tests/arsc_test.c

index 1730e86..f5fa759 100644 (file)
@@ -3,6 +3,7 @@
 # To enable any of these options, add a line like the following to your Makelocal
 # CFLAGS += $(CONFIG_APPSERVER)
 CONFIG_APPSERVER:=                 -D__CONFIG_APPSERVER__
+CONFIG_ARSC_SERVER:=               -D__CONFIG_ARSC_SERVER__
 
 # Kernel configuration parameters
 # By default, each of these options will be turned off
@@ -27,7 +28,6 @@ CONFIG_ENABLE_MPTABLES:=           -D__CONFIG_ENABLE_MPTABLES__
 CONFIG_MONITOR_ON_INT:=            -D__CONFIG_MONITOR_ON_INT__
 CONFIG_DISABLE_SMT:=               -D__CONFIG_DISABLE_SMT__
 CONFIG_BOXBORO:=                   -D__CONFIG_BOXBORO__
-CONFIG_ARSC_SERVER:=               -D__CONFIG_ARSC_SERVER__
 CONFIG_RESET_STACKS:=              -D__CONFIG_RESET_STACKS__
 CONFIG_PCI_VERBOSE:=               -D__CONFIG_PCI_VERBOSE__
 CONFIG_ETH_AUDIO:=                 -D__CONFIG_ETH_AUDIO__
index 6e1ba7d..beb0e80 100644 (file)
@@ -1,3 +1,4 @@
+#ifdef __CONFIG_ARSC_SERVER__
 #include <rstdio.h>
 #include <stdlib.h>
 #include <pthread.h>
@@ -46,4 +47,6 @@ int main(int argc, char** argv){
 
        printf("multi thread - end\n");
 }
-
+#else
+int main(){};
+#endif
index 86552cd..94d3e0a 100644 (file)
@@ -1,3 +1,4 @@
+#ifdef __CONFIG_ARSC_SERVER__
 #include <parlib.h>
 #include <vcore.h>
 #include <ros/syscall.h>
@@ -37,3 +38,7 @@ int main(int argc, char** argv){
        assert(-1 != waiton_syscall(sysdesc[1]));
        printf ("single thread - dummy call \n");       
 }
+
+#else
+int main(){};
+#endif