#include "native/native.h"
#include "threads/lock-common.h"
+#include "threads/mutex.hpp"
#include "toolbox/logging.h"
#include "vm/vm.hpp"
#include "vm/jit/asmpart.h"
+#include "vm/jit/stubs.hpp"
/* debugging macros ***********************************************************/
static s4 interfaceindex; /* sequential numbering of interfaces */
static s4 classvalue;
-java_object_t *linker_classrenumber_lock;
+Mutex *linker_classrenumber_mutex;
/* private functions **********************************************************/
interfaceindex = 0;
#if defined(ENABLE_THREADS)
- /* create the global lock object */
+ /* create the global mutex */
- linker_classrenumber_lock = NEW(java_object_t);
-
- LOCK_INIT_OBJECT_LOCK(linker_classrenumber_lock);
+ linker_classrenumber_mutex = Mutex_new();
#endif
/* Link the most basic classes. */
m->stubroutine = intrp_createcompilerstub(m);
else
#endif
- m->stubroutine = codegen_generate_stub_compiler(m);
+ m->stubroutine = CompilerStub_generate(m);
#else
m->stubroutine = intrp_createcompilerstub(m);
#endif
static void linker_compute_subclasses(classinfo *c)
{
- LOCK_MONITOR_ENTER(linker_classrenumber_lock);
+ Mutex_lock(linker_classrenumber_mutex);
if (!(c->flags & ACC_INTERFACE)) {
c->nextsub = NULL;
linker_compute_class_values(class_java_lang_Object);
- LOCK_MONITOR_EXIT(linker_classrenumber_lock);
+ Mutex_unlock(linker_classrenumber_mutex);
}