change
[IRC.git] / Robust / src / Runtime / SimpleHash.c
index d5a45b801c2b2bf73720137a4d199d4c21c67c72..9db196750b244613dd08a968e0ca96086e68f1a5 100755 (executable)
@@ -1,5 +1,7 @@
 #include "SimpleHash.h"
 #ifdef MULTICORE
+#include "methodheaders.h"
+#include "multicore_arch.h"
 #include "runtime_arch.h"
 #else
 #include <stdio.h>
@@ -22,10 +24,10 @@ struct RuntimeHash * noargallocateRuntimeHash() {
 }
 
 struct RuntimeHash * allocateRuntimeHash(int size) {
-  struct RuntimeHash *thisvar;  //=(struct RuntimeHash *)RUNMALLOC(sizeof(struct RuntimeHash));
+  struct RuntimeHash *thisvar;
   if (size <= 0) {
 #ifdef MULTICORE
-    BAMBOO_EXIT(0xf101);
+    BAMBOO_EXIT();
 #else
     printf("Negative Hashtable size Exception\n");
     exit(-1);
@@ -205,10 +207,10 @@ int RuntimeHashadd(struct RuntimeHash * thisvar,int key, int data) {
 
 #ifdef MULTICORE
 struct RuntimeHash * allocateRuntimeHash_I(int size) {
-  struct RuntimeHash *thisvar;  //=(struct RuntimeHash *)RUNMALLOC(sizeof(struct RuntimeHash));
+  struct RuntimeHash *thisvar;
   if (size <= 0) {
 #ifdef MULTICORE
-    BAMBOO_EXIT(0xf101);
+    BAMBOO_EXIT();
 #else
     printf("Negative Hashtable size Exception\n");
     exit(-1);
@@ -245,7 +247,7 @@ int RuntimeHashadd_I(struct RuntimeHash * thisvar,int key, int data) {
       }
     }
     thisvar->size=newsize;
-    RUNFREE(thisvar->bucket);
+    RUNFREE_I(thisvar->bucket);
     thisvar->bucket=newbucket;
   }