Add GC_CACHE_COHERENT_ON
[IRC.git] / Robust / src / Runtime / option.c
index 1d673874d1be5d2ffe0acfe3670b2f300d25325c..8fb9cf08f5af794df117077735338b7bd6522258 100644 (file)
@@ -9,6 +9,7 @@ extern char *options;
 extern int injectfailures;
 extern float failurechance;
 extern int debugtask;
+extern int errors;
 extern int injectinstructionfailures;
 extern int failurecount;
 extern float instfailurechance;
@@ -31,7 +32,7 @@ void processOptions() {
       options=strchr(options,' ');
       if (options!=NULL) options++;
       if (options==NULL)
-       break;
+        break;
       sscanf(options, "%f", &failurechance);
       injectfailures=1;
       printf("Injecting errors with chance=%f\n",failurechance);
@@ -41,18 +42,18 @@ void processOptions() {
       options=strchr(options,' ');
       if (options!=NULL) options++;
       if (options==NULL)
-       break;
+        break;
       sscanf(options, "%d", &failurecount);
       options=strchr(options,' ');
       if (options!=NULL) options++;
       if (options==NULL)
-       break;
+        break;
 
       sscanf(options, "%f", &instfailurechance);
       options=strchr(options,' ');
       if (options!=NULL) options++;
       if (options==NULL)
-       break;
+        break;
 
       sscanf(options, "%d", &numfailures);
       options=strchr(options,' ');
@@ -69,6 +70,11 @@ void processOptions() {
       if (options!=NULL) options++;
       debugtask=1;
       printf("Debug task option on.\n");
+    } else if (strncmp(options, "-errors",sizeof("-errors")-1)==0) {
+      options=strchr(options,' ');
+      if (options!=NULL) options++;
+      errors=1;
+      printf("Errors on.\n");
     } else if (strncmp(options, "-initializerandom", sizeof("-initializerandom")-1)==0) {
       options=strchr(options,' ');
       if (options!=NULL) options++;