-/* nat/VMObject.c - java/lang/Object
+/* native/vm/VMObject.c - java/lang/Object
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
- M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
- P. Tomsich, J. Wenninger
+ Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
+ R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
+ C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
+ Institut f. Computersprachen - TU Wien
This file is part of CACAO.
Changes: Joseph Wenninger
- $Id: VMObject.c 1042 2004-04-26 17:12:47Z twisti $
+ $Id: VMObject.c 1735 2004-12-07 14:33:27Z twisti $
*/
#include <stdlib.h>
#include <string.h>
-#include "jni.h"
-#include "builtin.h"
-#include "loader.h"
-#include "native.h"
+
#include "mm/boehm.h"
-#include "threads/locks.h"
-#include "toolbox/loging.h"
-#include "toolbox/memory.h"
-#include "java_lang_Cloneable.h"
-#include "java_lang_Object.h"
+#include "mm/memory.h"
+#include "toolbox/logging.h"
+#include "native/jni.h"
+#include "native/native.h"
+#include "native/include/java_lang_Cloneable.h"
+#include "native/include/java_lang_Object.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+
+#if defined(USE_THREADS)
+# if defined(NATIVE_THREADS)
+# include "threads/native/threads.h"
+# else
+# include "threads/green/threads.h"
+# include "threads/green/locks.h"
+# endif
+#endif
/*
new = (java_lang_Object *) heap_allocate(size, (desc->arraytype == ARRAYTYPE_OBJECT), NULL);
memcpy(new, this, size);
#if defined(USE_THREADS) && defined(NATIVE_THREADS)
- new->header.monitorBits = 0;
+ initObjectLock((java_objectheader *) new);
#endif
return new;
memcpy(new, this, c->instancesize);
#if defined(USE_THREADS) && defined(NATIVE_THREADS)
- new->header.monitorBits = 0;
+ initObjectLock((java_objectheader *) new);
#endif
return new;
log_text("java_lang_VMObject_wait called");
#if defined(USE_THREADS)
- wait_cond_for_object(&this->header, time);
+ wait_cond_for_object(&this->header, time, par3);
#endif
}