-/* global.h - global definitions
+/* vm/global.h - global definitions
- 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: Mark Probst
Philipp Tomsich
Edwin Steiner
+ Joseph Wenninger
- $Id: global.h 1658 2004-12-03 15:28:15Z twisti $
+ $Id: global.h 1831 2004-12-29 13:47:33Z twisti $
*/
/* additional data types ******************************************************/
typedef void *voidptr; /* generic pointer */
-typedef void (*functionptr) (); /* generic function pointer */
+typedef void (*functionptr) (void); /* generic function pointer */
typedef int bool; /* boolean data type */
#include "vm/jit/inline/sets.h"
-#if defined(USE_THREADS) && defined(NATIVE_THREADS)
-#include <pthread.h>
-#include <semaphore.h>
-#endif
+/* define some cacao paths ****************************************************/
-/* define path to rt.jar plus ending : ****************************************/
-
-#define RT_JAR_PATH "/jre/lib/rt.jar:"
+#define CACAO_LIBRARY_PATH "/jre/lib/"ARCH_DIR"/"
+#define CACAO_RT_JAR_PATH "/jre/lib/rt.jar"
#define STATISTICS /* if enabled collects program statistics */
/* data structure for storing information needed for a stacktrace across native functions*/
+
+typedef struct native_stackframeinfo native_stackframeinfo;
+
struct native_stackframeinfo {
void *oldThreadspecificHeadValue;
void **addressOfThreadspecificHead;
methodinfo *method;
+#ifdef __ALPHA__
+ void *savedpv;
+#endif
+ void *beginOfJavaStackframe; /*only used if != 0*/
void *returnToFromNative;
#if 0
#endif
};
-typedef struct native_stackframeinfo native_stackframeinfo;
+
+typedef struct stacktraceelement stacktraceelement;
struct stacktraceelement {
#if POINTERSIZE == 8
methodinfo *method;
};
-typedef struct stacktraceelement stacktraceelement;
+
+typedef struct stackTraceBuffer stackTraceBuffer;
+
+struct stackTraceBuffer {
+ s4 needsFree;
+ stacktraceelement *start;
+ s4 size;
+ s4 full;
+};
+
+
/* data structure for calls from c code to java methods */