* src/vm/jit/alpha/emit.c [ENABLE_THREADS] (threads/native/lock.h):
[cacao.git] / src / vm / jit / patcher.h
index 6aba53588725b31f48d5866d7daee0fda2df91fe..00f7de7591ea3647873557f01feab0c1141e1488 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: patcher.h 5081 2006-07-06 13:59:01Z tbfg $
+   $Id: patcher.h 5123 2006-07-12 21:45:34Z twisti $
 
 */
 
 
 #include "vm/types.h"
 
+#if defined(ENABLE_THREADS)
+# include "threads/native/lock.h"
+#endif
+
 #include "vm/global.h"
 
 
 #define PATCHER_MONITORENTER \
        /* enter a monitor on the patching position */       \
                                                             \
-       builtin_monitorenter(o);                             \
+       lock_monitor_enter(o);                               \
                                                             \
        /* check if the position has already been patched */ \
                                                             \
        if (o->vftbl != NULL) {                              \
         assert(o->vftbl == PATCHER_FLAG_PATCHED);        \
                                                          \
-               builtin_monitorexit(o);                          \
+               lock_monitor_exit(o);                            \
                                                             \
                return NULL;                                     \
        }                                                    \
@@ -71,7 +75,7 @@
 #define PATCHER_MONITOREXIT \
        /* leave the monitor on the patching position */     \
                                                             \
-       builtin_monitorexit(o);
+       lock_monitor_exit(o);
 
 
 #define PATCHER_MARK_PATCHED_MONITOREXIT \