From 2d6b8f95f66d3a7ad87ef0a664aa742c6bd9cb37 Mon Sep 17 00:00:00 2001 From: twisti Date: Tue, 4 Apr 2006 09:17:05 +0000 Subject: [PATCH] * src/threads/native/threads.c (tablelock): Removed. (tables_lock, tables_unlock): Likewise. (criticalcompare): Removed tablelock initialization. * src/vm/hashtable.h (tables_lock, tables_unlock): Removed. * src/vm/global.h (VFTBLINTERFACETABLE): Likewise. (cast_lock, cast_unlock): Likewise. --- src/threads/native/threads.c | 16 +------------ src/vm/global.h | 44 ++++++------------------------------ src/vm/hashtable.h | 7 +----- 3 files changed, 9 insertions(+), 58 deletions(-) diff --git a/src/threads/native/threads.c b/src/threads/native/threads.c index 1be6857c1..13900d50e 100644 --- a/src/threads/native/threads.c +++ b/src/threads/native/threads.c @@ -29,7 +29,7 @@ Changes: Christian Thalinger Edwin Steiner - $Id: threads.c 4661 2006-03-21 00:04:59Z motse $ + $Id: threads.c 4728 2006-04-04 09:17:05Z twisti $ */ @@ -172,7 +172,6 @@ __thread threadobject *threadobj; #endif static pthread_mutex_rec_t compiler_mutex; -static pthread_mutex_rec_t tablelock; void compiler_lock() { @@ -184,17 +183,6 @@ void compiler_unlock() pthread_mutex_unlock_rec(&compiler_mutex); } -void tables_lock() -{ - pthread_mutex_lock_rec(&tablelock); -} - -void tables_unlock() -{ - pthread_mutex_unlock_rec(&tablelock); -} - - static s4 criticalcompare(const void *pa, const void *pb) { const threadcritnode *na = pa; @@ -507,11 +495,9 @@ void threads_preinit(void) pthread_mutexattr_init(&mutexattr); pthread_mutexattr_settype(&mutexattr, PTHREAD_MUTEX_RECURSIVE); pthread_mutex_init(&compiler_mutex, &mutexattr); - pthread_mutex_init(&tablelock, &mutexattr); pthread_mutexattr_destroy(&mutexattr); #else pthread_mutex_init_rec(&compiler_mutex); - pthread_mutex_init_rec(&tablelock); #endif pthread_mutex_init(&threadlistlock, NULL); diff --git a/src/vm/global.h b/src/vm/global.h index 946cd3128..2d933a228 100644 --- a/src/vm/global.h +++ b/src/vm/global.h @@ -33,7 +33,7 @@ Joseph Wenninger Christian Thalinger - $Id: global.h 4682 2006-03-23 00:08:28Z edwin $ + $Id: global.h 4728 2006-04-04 09:17:05Z twisti $ */ @@ -42,7 +42,7 @@ #define _GLOBAL_H #include "config.h" -#include "types.h" +#include "vm/types.h" /* additional data types ******************************************************/ @@ -116,15 +116,15 @@ typedef struct java_objectarray java_objectarray; /* primitive data types *******************************************************/ -/* These values are used in parsed descriptors and in some other places */ -/* were the different types handled internally as TYPE_INT have to be */ -/* distinguished. */ +/* These values are used in parsed descriptors and in some other + places were the different types handled internally as TYPE_INT have + to be distinguished. */ #define PRIMITIVETYPE_COUNT 11 /* number of primitive types (+ dummies) */ /* CAUTION: Don't change the numerical values! These constants are - * used as indices into the primitive type table. - */ + used as indices into the primitive type table. */ + #define PRIMITIVETYPE_INT TYPE_INT #define PRIMITIVETYPE_LONG TYPE_LONG #define PRIMITIVETYPE_FLOAT TYPE_FLOAT @@ -293,43 +293,13 @@ struct java_objectarray { }; -#define VFTBLINTERFACETABLE(v,i) (v)->interfacetable[-i] - - -/* flag variables *************************************************************/ - -extern bool cacao_initializing; - - /* Synchronization ************************************************************/ #if defined(USE_THREADS) && defined(NATIVE_THREADS) -void cast_lock(); -void cast_unlock(); void compiler_lock(); void compiler_unlock(); #endif - -/**** Methods: called directly by cacao, which defines the callpath ***/ -#define MAINCLASS mainstring -#define MAINMETH "main" -#define MAINDESC "([Ljava/lang/String;)V" - -#define EXITCLASS "java/lang/System" -#define EXITMETH "exit" -#define EXITDESC "(I)V" - -#if defined(USE_THREADS) - #define THREADCLASS "java/lang/Thread" - #define THREADMETH "" - #define THREADDESC "(Ljava/lang/VMThread;Ljava/lang/String;IZ)V" - - #define THREADGROUPCLASS "java/lang/ThreadGroup" - #define THREADGROUPMETH "addThread" - #define THREADGROUPDESC "(Ljava/lang/Thread;)V" -#endif - #endif /* _GLOBAL_H */ diff --git a/src/vm/hashtable.h b/src/vm/hashtable.h index 2c4dab1e5..a15ab6f0c 100644 --- a/src/vm/hashtable.h +++ b/src/vm/hashtable.h @@ -28,7 +28,7 @@ Changes: Christian Thalinger - $Id: hashtable.h 4357 2006-01-22 23:33:38Z twisti $ + $Id: hashtable.h 4728 2006-04-04 09:17:05Z twisti $ */ @@ -111,11 +111,6 @@ struct hashtable { /* create hashtable */ void hashtable_create(hashtable *hash, u4 size); -#if defined(USE_THREADS) && defined(NATIVE_THREADS) -void tables_lock(void); -void tables_unlock(void); -#endif - #endif /* _HASHTABLE_H */ -- 2.25.1