Changes:
- $Id: avl.c 4908 2006-05-12 16:49:50Z edwin $
+ $Id: avl.c 4921 2006-05-15 14:24:36Z twisti $
*/
#include "mm/memory.h"
#include "toolbox/avl.h"
-#if defined(USE_THREADS)
-# if defined(NATIVE_THREADS)
-# include "threads/native/threads.h"
-# else
-# include "threads/green/threads.h"
-# endif
+#if defined(ENABLE_THREADS)
+# include "threads/native/threads.h"
#endif
#include "vm/builtin.h"
t->comparator = compar;
t->entries = 0;
-#if defined(USE_THREADS)
+#if defined(ENABLE_THREADS)
/* create lock object for this tree */
t->lock = NEW(java_objectheader);
-# if defined(NATIVE_THREADS)
lock_init_object_lock(t->lock);
-# endif
#endif
return t;
assert(tree);
assert(data);
-#if defined(USE_THREADS)
+#if defined(ENABLE_THREADS)
builtin_monitorenter(tree->lock);
#endif
printf("-------------------\n");
#endif
-#if defined(USE_THREADS)
+#if defined(ENABLE_THREADS)
builtin_monitorexit(tree->lock);
#endif
assert(tree);
assert(data);
-#if defined(USE_THREADS)
+#if defined(ENABLE_THREADS)
builtin_monitorenter(tree->lock);
#endif
/* was the entry found? return it */
if (res == 0) {
-#if defined(USE_THREADS)
+#if defined(ENABLE_THREADS)
builtin_monitorexit(tree->lock);
#endif
node = node->childs[(res < 0) ? AVL_LEFT : AVL_RIGHT];
}
-#if defined(USE_THREADS)
+#if defined(ENABLE_THREADS)
builtin_monitorexit(tree->lock);
#endif