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 $
*/
#endif
static pthread_mutex_rec_t compiler_mutex;
-static pthread_mutex_rec_t tablelock;
void compiler_lock()
{
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;
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);
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 $
*/
#define _GLOBAL_H
#include "config.h"
-#include "types.h"
+#include "vm/types.h"
/* additional data types ******************************************************/
/* 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
};
-#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 "<init>"
- #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 */
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 $
*/
/* 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 */