* src/threads/lock-common.h: New file.
authortwisti <none@none>
Wed, 25 Apr 2007 19:20:13 +0000 (19:20 +0000)
committertwisti <none@none>
Wed, 25 Apr 2007 19:20:13 +0000 (19:20 +0000)
* src/threads/native/lock.h: Removed function prototypes.
* src/threads/none/lock.h (LOCK_INIT_OBJECT_LOCK): Added.

* src/mm/memory.c,
src/native/jni.c,
src/native/native.c,
src/native/vm/java_lang_Object.c,
src/native/vm/java_lang_Thread.c,
src/threads/Makefile.am,
src/threads/native/threads.c,
src/threads/threads-common.c,
src/toolbox/avl.c,
src/toolbox/hashtable.c,
src/toolbox/list.c,
src/vm/builtin.c,
src/vm/finalizer.c,
src/vm/initialize.c,
src/vm/jit/inline/inline.c,
src/vm/jit/jit.c,
src/vm/jit/optimizing/recompile.c,
src/vm/jit/parse.c,
src/vm/jit/patcher.h,
src/vm/jit/show.c,
src/vm/jit/x86_64/codegen.c,
src/vm/jit/x86_64/emit.c,
src/vm/string.c,
src/vmcore/class.c,
src/vmcore/classcache.c,
src/vmcore/linker.c,
src/vmcore/loader.c,
src/vmcore/suck.c,
src/vmcore/utf8.c: Updated headers.

32 files changed:
src/mm/memory.c
src/native/jni.c
src/native/native.c
src/native/vm/java_lang_Object.c
src/native/vm/java_lang_Thread.c
src/threads/Makefile.am
src/threads/lock-common.h [new file with mode: 0644]
src/threads/native/lock.h
src/threads/native/threads.c
src/threads/none/lock.h
src/threads/threads-common.c
src/toolbox/avl.c
src/toolbox/hashtable.c
src/toolbox/list.c
src/vm/builtin.c
src/vm/finalizer.c
src/vm/initialize.c
src/vm/jit/inline/inline.c
src/vm/jit/jit.c
src/vm/jit/optimizing/recompile.c
src/vm/jit/parse.c
src/vm/jit/patcher.h
src/vm/jit/show.c
src/vm/jit/x86_64/codegen.c
src/vm/jit/x86_64/emit.c
src/vm/string.c
src/vmcore/class.c
src/vmcore/classcache.c
src/vmcore/linker.c
src/vmcore/loader.c
src/vmcore/suck.c
src/vmcore/utf8.c

index 0ae00bd6ac6a99d0f4c6b64b629d8aea75d7433a..0f257dd3f19cd4da1983dda4423b75421bcb1ffb 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: memory.c 7811 2007-04-25 18:33:30Z twisti $
+   $Id: memory.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 #include "arch.h"
 
 #include "mm/memory.h"
+
 #include "native/native.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/threads-common.h"
-
-# include "threads/native/lock.h"
-# include "threads/native/threads.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
+#include "threads/threads-common.h"
 
 #include "toolbox/logging.h"
+
 #include "vm/exceptions.h"
 #include "vm/global.h"
 #include "vm/stringlocal.h"
 #include "vm/vm.h"
+
 #include "vmcore/options.h"
 
 #if defined(ENABLE_STATISTICS)
index 8ef0f526f4c5ce7c5c9b0be9f237612dd5ec8317..57b2351ddf11460e99b6a40e36302d6dfe25eeab 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: jni.c 7722 2007-04-16 15:57:21Z twisti $
+   $Id: jni.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 # include "native/vm/java_lang_ClassLoader.h"
 #endif
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-# include "threads/native/threads.h"
-#else
-# include "threads/none/lock.h"
-# include "threads/none/threads.h"
-#endif
+#include "threads/lock-common.h"
+#include "threads/threads-common.h"
 
 #include "toolbox/logging.h"
 
index 10773546bef3625eb2bc41137032da79f44b71d1..ede33333be6cf0e5bf9693e68f72b969f5318be6 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: native.c 7808 2007-04-25 15:12:20Z twisti $
+   $Id: native.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 #include "native/include/java_lang_String.h"
 #include "native/include/java_lang_Throwable.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/hashtable.h"
 #include "toolbox/logging.h"
index 83f5f7570552969bb057467804e64f31284d9fe6..adadd0d0be95e9de84fa6abe5b779cc40170a863 100644 (file)
@@ -47,9 +47,7 @@
 
 #include "native/include/java_lang_Object.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "vm/builtin.h"
 
index aeba0e8ec163f9b1fe3957c69d4d33a941b28c62..ee13ad558d553571e650328c358e2e81d4b33d39 100644 (file)
@@ -43,6 +43,7 @@
 # include "native/include/java_lang_VMThread.h"
 #endif
 
+#include "threads/lock-common.h"
 #include "threads/threads-common.h"
 
 #include "toolbox/logging.h"
index 412c3f5bf20ffe7fb4816b9c8beba527c70b79a9..f8e34c8d0671ff001c8380ebe1b561dfe9dabbf4 100644 (file)
@@ -22,7 +22,7 @@
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 ##
-## $Id: Makefile.am 7365 2007-02-15 19:42:13Z twisti $
+## $Id: Makefile.am 7813 2007-04-25 19:20:13Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
@@ -46,6 +46,7 @@ noinst_LTLIBRARIES = \
 libthreads_la_SOURCES = \
        critical.c \
        critical.h \
+       lock-common.h \
        threads-common.c \
        threads-common.h
 
diff --git a/src/threads/lock-common.h b/src/threads/lock-common.h
new file mode 100644 (file)
index 0000000..433c16d
--- /dev/null
@@ -0,0 +1,84 @@
+/* src/threads/lock-common.h - common stuff of lock implementation
+
+   Copyright (C) 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   $Id: threads.h 4866 2006-05-01 21:40:38Z edwin $
+
+*/
+
+
+#ifndef _LOCK_COMMON_H
+#define _LOCK_COMMON_H
+
+#include "config.h"
+#include "vm/types.h"
+
+#include "vm/global.h"
+
+#if defined(ENABLE_THREADS)
+# include "threads/native/lock.h"
+#else
+# include "threads/none/lock.h"
+#endif
+
+
+/* functions ******************************************************************/
+
+void lock_init(void);
+
+void lock_init_execution_env(struct threadobject *thread);
+void lock_record_free_pools(lock_record_pool_t *pool);
+
+void lock_init_object_lock(java_objectheader *);
+lock_record_t *lock_get_initial_lock_word(void);
+
+ptrint lock_pre_compute_thinlock(s4 index);
+
+bool lock_monitor_enter(java_objectheader *);
+bool lock_monitor_exit(java_objectheader *);
+
+#define LOCK_monitor_enter    (functionptr) lock_monitor_enter
+#define LOCK_monitor_exit     (functionptr) lock_monitor_exit
+
+bool lock_is_held_by_current_thread(java_objectheader *o);
+
+void lock_wait_for_object(java_objectheader *o, s8 millis, s4 nanos);
+void lock_notify_object(java_objectheader *o);
+void lock_notify_all_object(java_objectheader *o);
+
+#endif /* _LOCK_COMMON_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index abc5a5810147b3fb9ccd4f72e775a95f6f3261a6..89eea9c038d9690236ac57adc7d13f190001c9d2 100644 (file)
@@ -135,33 +135,13 @@ extern lock_record_pool_t *lock_global_pool;
 #endif
 
 
-/* functions ******************************************************************/
+/* defines *********************************************************************/
 
-void lock_init(void);
-
-void lock_init_execution_env(struct threadobject *thread);
-void lock_record_free_pools(lock_record_pool_t *pool);
-
-void lock_init_object_lock(java_objectheader *);
-lock_record_t *lock_get_initial_lock_word(void);
-
-ptrint lock_pre_compute_thinlock(s4 index);
-
-bool lock_monitor_enter(java_objectheader *);
-bool lock_monitor_exit(java_objectheader *);
-
-#define LOCK_monitor_enter    (functionptr) lock_monitor_enter
-#define LOCK_monitor_exit     (functionptr) lock_monitor_exit
+#define LOCK_INIT_OBJECT_LOCK(o) lock_init_object_lock((java_objectheader *) (o))
 
 #define LOCK_MONITOR_ENTER(o)    lock_monitor_enter((java_objectheader *) (o))
 #define LOCK_MONITOR_EXIT(o)     lock_monitor_exit((java_objectheader *) (o))
 
-bool lock_is_held_by_current_thread(java_objectheader *o);
-
-void lock_wait_for_object(java_objectheader *o, s8 millis, s4 nanos);
-void lock_notify_object(java_objectheader *o);
-void lock_notify_all_object(java_objectheader *o);
-
 #endif /* _LOCK_H */
 
 
index 0d1a6d40cec86f0f13d429c4857921eb9e28ac72..11e52b4a4acd7336620ff8dbea9c261caf53d200 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads.c 7811 2007-04-25 18:33:30Z twisti $
+   $Id: threads.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
@@ -71,6 +71,7 @@
 # include "native/include/java_lang_VMThread.h"
 #endif
 
+#include "threads/lock-common.h"
 #include "threads/threads-common.h"
 
 #include "threads/native/threads.h"
index b671bd7e6d4ae8a5444e9a7bb27ff320f315371a..c8f8424d27cc4e61088c01ba6ccd8210526f3181 100644 (file)
@@ -30,7 +30,9 @@
 #ifndef _LOCK_H
 #define _LOCK_H
 
-/* define some stuff we need to no-ops ****************************************/
+/* define some stuff to no-ops *************************************************/
+
+#define LOCK_INIT_OBJECT_LOCK(o)
 
 #define LOCK_MONITOR_ENTER(o)
 #define LOCK_MONITOR_EXIT(o)
index ff0b7ec160d2287d4dae3bdfc02fc100b63231f4..a32864efd0c59fc3d5cab13a89d1e7af64ef4509 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads-common.c 7811 2007-04-25 18:33:30Z twisti $
+   $Id: threads-common.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
@@ -43,6 +43,7 @@
 # include "native/include/java_lang_VMThread.h"
 #endif
 
+#include "threads/lock-common.h"
 #include "threads/threads-common.h"
 
 #include "threads/native/threads.h"
index 15337fa4398528d9485680043c039dfd4610e306..e561d0adf94eeb196c6e2a139dc631e53123ca55 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: avl.c 7246 2007-01-29 18:49:05Z twisti $
+   $Id: avl.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 #include "vm/types.h"
 
 #include "mm/memory.h"
-#include "toolbox/avl.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
+
+#include "toolbox/avl.h"
 
 
 /* avl_create ******************************************************************
@@ -64,7 +61,7 @@ avl_tree *avl_create(avl_comparator *compar)
 
        t->lock       = NEW(java_objectheader);
 
-       lock_init_object_lock(t->lock);
+       LOCK_INIT_OBJECT_LOCK(t->lock);
 #endif
 
        return t;
index d6d7bf1851826ec7611f9802a0381840e790b179..4c394c79ca342b6d04cf1d873d3a0ed78e61fadd 100644 (file)
@@ -1,4 +1,4 @@
-/* src/vm/hashtable.c - functions for internal hashtables
+/* src/toolbox/hashtable.c - functions for internal hashtables
 
    Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
    C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Contact: cacao@cacaojvm.org
-
-   Authors: Reinhard Grafl
-            Mark Probst
-            Andreas Krall
-            Christian Thalinger
-
-   $Id: hashtable.c 7246 2007-01-29 18:49:05Z twisti $
+   $Id: hashtable.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/hashtable.h"
+
 #include "vm/global.h"
 
 
@@ -65,7 +57,7 @@ void hashtable_create(hashtable *hash, u4 size)
 
        hash->header = NEW(java_objectheader);
 
-       lock_init_object_lock(hash->header);
+       LOCK_INIT_OBJECT_LOCK(hash->header);
 #endif
 
        /* set initial hash values */
index e5a46d5c3dc5fac5cfabe3b5851b8e5393847ee5..60ef8d9cb18d3950f5d0e5366530ce7cd3ce4f93 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: list.c 7784 2007-04-20 13:51:41Z twisti $
+   $Id: list.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/list.h"
 
index 9100cb5290d7fd10db83307c654f31de97813c95..da6a392b330fc8c1c251dbaa3c52af2ca1cab7dd 100644 (file)
@@ -28,7 +28,7 @@
    calls instead of machine instructions, using the C calling
    convention.
 
-   $Id: builtin.c 7785 2007-04-21 10:55:30Z edwin $
+   $Id: builtin.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
@@ -59,9 +59,7 @@
 #include "native/include/java_lang_String.h"
 #include "native/include/java_lang_Throwable.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/logging.h"
 #include "toolbox/util.h"
index f0636efdda1e551e398e6cf09a1d7de593561fed..56aa43c7e67143137d79041b8113b52fe5003d6f 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: finalizer.c 7811 2007-04-25 18:33:30Z twisti $
+   $Id: finalizer.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/threads-common.h"
-
-# include "threads/native/threads.h"
-# include "threads/native/lock.h"
-#else
-# include "threads/none/threads.h"
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
+#include "threads/threads-common.h"
 
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
@@ -75,7 +68,7 @@ bool finalizer_init(void)
 #if defined(ENABLE_THREADS)
        lock_thread_finalizer = NEW(java_objectheader);
 
-       lock_init_object_lock(lock_thread_finalizer);
+       LOCK_INIT_OBJECT_LOCK(lock_thread_finalizer);
 #endif
 
        /* everything's ok */
index 366f85f9df446c2c39f0458929f932f7821ca1cf..9619b9656701d99276405cf37b745e1b9e7b759e 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: initialize.c 7246 2007-01-29 18:49:05Z twisti $
+   $Id: initialize.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 
 #include "vm/types.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "vm/global.h"
 #include "vm/initialize.h"
index cbda14347a5ce1afd4a0fc6056b3d90358ac7128..b790fe4dbb27ab0fd2a53b9237fc3396463e9b32 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: inline.c 7766 2007-04-19 13:24:48Z michi $
+   $Id: inline.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
@@ -38,9 +38,8 @@
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/threads.h"
-#endif
+#include "threads/lock-common.h"
+#include "threads/threads-common.h"
 
 #include "toolbox/logging.h"
 
@@ -340,10 +339,9 @@ static bool inline_jit_compile(inline_node *iln)
        m = iln->m;
        assert(m);
 
-#if defined(ENABLE_THREADS)
        /* enter a monitor on the method */
-       lock_monitor_enter((java_objectheader *) m);
-#endif
+
+       LOCK_MONITOR_ENTER(m);
 
        /* allocate jitdata structure and fill it */
 
@@ -384,10 +382,9 @@ static bool inline_jit_compile(inline_node *iln)
 
 #endif
 
-#if defined(ENABLE_THREADS)
        /* leave the monitor */
-       lock_monitor_exit((java_objectheader *) m );
-#endif
+
+       LOCK_MONITOR_EXIT(m);
 
        return r;
 }
index 9e50926400cde9fed38449b837b8eca461fba48b..b830a93d62be781e8da368fceb17a699fdcfa6ab 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: jit.c 7692 2007-04-12 14:47:24Z twisti $
+   $Id: jit.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 #include "vm/types.h"
 
 #include "mm/memory.h"
+
 #include "native/native.h"
+
 #include "toolbox/logging.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "vm/global.h"
 #include "vm/initialize.h"
index e1754d5ae257f3819e50284fd9bfa32f925b3544..fc04c7337b759e7d05f38328462abdb3f9db6642 100644 (file)
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/threads-common.h"
-
-# include "threads/native/lock.h"
-# include "threads/native/threads.h"
-#endif
+#include "threads/lock-common.h"
+#include "threads/threads-common.h"
 
 #include "toolbox/list.h"
 
index 2575c3308b1d0f5345849b8ef04f0d0ccdea5a45..49655c68cbbc4fc9e371de3c33c3064601a97757 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: parse.c 7766 2007-04-19 13:24:48Z michi $
+   $Id: parse.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 #include "vm/types.h"
 
 #include "mm/memory.h"
+
 #include "native/native.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/logging.h"
 
index 9b2c5916c99c9267ceed107dd48fb65e357bda82..a321ce7fe2c4a19597b1efb49626de6f99f72d56 100644 (file)
@@ -1,6 +1,6 @@
 /* src/vm/jit/patcher.h - code patching functions
 
-   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
+   Copyright (C) 1996-2005, 2006, 2007 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
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Contact: cacao@cacaojvm.org
-
-   Authors: Christian Thalinger
-
-   Changes: Edwin Steiner
-
-   $Id: patcher.h 5929 2006-11-06 17:13:40Z twisti $
+   $Id: patcher.h 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
@@ -42,9 +36,7 @@
 
 #include "vm/types.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "vm/global.h"
 
index d577b2b38d6d1cce92f9eacca9de2896879a6ead..12f28753f328db6c1be1f0cfd0d7de24a7f08841 100644 (file)
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "vm/global.h"
 #include "vm/builtin.h"
@@ -83,7 +79,7 @@ bool show_init(void)
 
        show_global_lock = NEW(java_objectheader);
 
-       lock_init_object_lock(show_global_lock);
+       LOCK_INIT_OBJECT_LOCK(show_global_lock);
 #endif
 
        /* everything's ok */
index 382aca99a58c627977e5fb6c632c55ff9195480f..cc68156a33cf3143f9c518d5afcdfc107fe31197 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 7754 2007-04-17 23:18:15Z twisti $
+   $Id: codegen.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 #include "vm/jit/x86_64/emit.h"
 
 #include "mm/memory.h"
+
 #include "native/jni.h"
 #include "native/native.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
index a7d9f0017ebefa76fe7a1947b143d4e4657acb68..f7bfc5f9006f7b447884c5cb14c412f27d482a4a 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 7766 2007-04-19 13:24:48Z michi $
+   $Id: emit.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
@@ -39,9 +39,7 @@
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
index a9b1d1a334d08f90a7864eb2a02aacb565f594d3..1d127f76f57c0248bdaf7d18043a187bc915e6ac 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: string.c 7522 2007-03-14 21:54:49Z twisti $
+   $Id: string.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 
 #include "native/include/java_lang_String.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
@@ -86,7 +82,7 @@ bool string_init(void)
 
        lock_hashtable_string = NEW(java_objectheader);
 
-       lock_init_object_lock(lock_hashtable_string);
+       LOCK_INIT_OBJECT_LOCK(lock_hashtable_string);
 #endif
 
        /* everything's ok */
index bc77f913082fd1108cfc1244a2e0eb759a9c8362..364b493970e3db2a5e6b73de49e691460dc21bd2 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: class.c 7783 2007-04-20 13:28:27Z twisti $
+   $Id: class.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
@@ -40,9 +40,7 @@
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/logging.h"
 
@@ -239,9 +237,7 @@ classinfo *class_create_classinfo(utf *classname)
        if (classname != utf_not_named_yet)
                class_set_packagename(c);
 
-#if defined(ENABLE_THREADS)
-       lock_init_object_lock(&c->object.header);
-#endif
+       LOCK_INIT_OBJECT_LOCK(&c->object.header);
 
        return c;
 }
index 0b26cc5c1e99b8b9cbdd133021c8267083c89087..93107b50b421b6b6519ee1d400da94c376426551 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: classcache.c 7560 2007-03-23 18:51:41Z twisti $
+   $Id: classcache.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
@@ -35,9 +35,7 @@
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/hashtable.h"
 #include "toolbox/logging.h"
@@ -266,7 +264,7 @@ bool classcache_init(void)
 
        lock_hashtable_classcache = NEW(java_objectheader);
 
-       lock_init_object_lock(lock_hashtable_classcache);
+       LOCK_INIT_OBJECT_LOCK(lock_hashtable_classcache);
 #endif
 
        /* everything's ok */
index 54ac99758705fde57c44933ddf5a0090aee16cb6..cf991f1de6c83bb674a7e0909eed7b36c6f9e3a0 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: linker.c 7810 2007-04-25 16:39:03Z stefan $
+   $Id: linker.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 #include "vm/types.h"
 
 #include "mm/memory.h"
+
 #include "native/native.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/logging.h"
 
@@ -134,10 +131,13 @@ bool linker_init(void)
 
        interfaceindex = 0;
 
+#if defined(ENABLE_THREADS)
        /* create the global lock object */
 
        linker_classrenumber_lock = NEW(java_objectheader);
-       lock_init_object_lock(linker_classrenumber_lock);
+
+       LOCK_INIT_OBJECT_LOCK(linker_classrenumber_lock);
+#endif
 
        /* link java.lang.Class as first class of the system, because we
        need it's vftbl for all other classes so we can use a class as
index d95aa34d2754c0fd9d617468d94bc9ecde29e830..a15f37199d5d74be9436e5a50c910cda09dd9ea5 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: loader.c 7692 2007-04-12 14:47:24Z twisti $
+   $Id: loader.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
@@ -37,9 +37,7 @@
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/logging.h"
 
@@ -94,7 +92,7 @@ bool loader_init(void)
        for (lce = list_first(list_classpath_entries); lce != NULL;
                 lce = list_next(list_classpath_entries, lce))
                if (lce->type == CLASSPATH_ARCHIVE)
-                       lock_init_object_lock((java_objectheader *) lce);
+                       LOCK_INIT_OBJECT_LOCK(lce);
 #endif
 
        /* load some important classes */
index 2fb8fee625313e8ba96f456542ff52adbb789ed9..48613d720278afe1d2752e5dce8bba980e5f5570 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: suck.c 7783 2007-04-20 13:28:27Z twisti $
+   $Id: suck.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/list.h"
 #include "toolbox/logging.h"
index 3251e5924cf80de20bb7acf014205ec124f1b3e3..65a4126568349fa2784c11d278f46815c4aef54c 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: utf8.c 7716 2007-04-16 14:29:53Z twisti $
+   $Id: utf8.c 7813 2007-04-25 19:20:13Z twisti $
 
 */
 
 
 #include "mm/memory.h"
 
-#if defined(ENABLE_THREADS)
-# include "threads/native/lock.h"
-#else
-# include "threads/none/lock.h"
-#endif
+#include "threads/lock-common.h"
 
 #include "toolbox/hashtable.h"