Changes:
- $Id: finalizer.c 4921 2006-05-15 14:24:36Z twisti $
+ $Id: finalizer.c 5123 2006-07-12 21:45:34Z twisti $
*/
#include "native/jni.h"
#include "native/include/java_lang_Thread.h"
#include "native/include/java_lang_VMThread.h"
+
+#if defined(ENABLE_THREADS)
+# include "threads/native/lock.h"
+#endif
+
#include "vm/builtin.h"
#include "vm/exceptions.h"
#include "vm/global.h"
while (true) {
/* get the lock on the finalizer lock object, so we can call wait */
- builtin_monitorenter(lock_finalizer_thread);
+ lock_monitor_enter(lock_finalizer_thread);
/* wait forever (0, 0) on that object till we are signaled */
/* leave the lock */
- builtin_monitorexit(lock_finalizer_thread);
+ lock_monitor_exit(lock_finalizer_thread);
/* and call the finalizers */
#if defined(ENABLE_THREADS)
/* get the lock on the finalizer lock object, so we can call wait */
- builtin_monitorenter(lock_finalizer_thread);
+ lock_monitor_enter(lock_finalizer_thread);
/* signal the finalizer thread */
/* leave the lock */
- builtin_monitorexit(lock_finalizer_thread);
+ lock_monitor_exit(lock_finalizer_thread);
#else
/* if we don't have threads, just run the finalizers */