Authors: Edwin Steiner
- Changes:
+ Changes: Christian Thalinger
- $Id: classcache.h 4957 2006-05-26 11:48:10Z edwin $
+ $Id: classcache.h 6209 2006-12-16 21:14:23Z edwin $
*/
#include <stdio.h> /* for FILE */
+#if defined(ENABLE_JVMTI)
+# include "native/jni.h"
+#endif
+
#include "vm/hashtable.h"
#include "vm/references.h"
extern hashtable hashtable_classcache;
-#if defined(ENABLE_JVMTI)
-#if defined(ENABLE_THREADS)
-# define CLASSCACHE_LOCK() builtin_monitorenter(lock_hashtable_classcache)
-# define CLASSCACHE_UNLOCK() builtin_monitorexit(lock_hashtable_classcache)
-#else
-# define CLASSCACHE_LOCK()
-# define CLASSCACHE_UNLOCK()
-#endif
-
-extern java_objectheader *lock_hashtable_classcache;
-#endif
/* structs ********************************************************************/
};
+/* callback function type for classcache_foreach_loaded_class */
+
+typedef void (*classcache_foreach_functionptr_t)(classinfo *, void *);
+
+
/* function prototypes ********************************************************/
/* initialize the loaded class cache */
methodinfo *m);
#endif
+s4 classcache_get_loaded_class_count(void);
+
+void classcache_foreach_loaded_class(classcache_foreach_functionptr_t func,
+ void *data);
+
+#if defined(ENABLE_JVMTI)
+void classcache_get_loaded_classes(s4 *class_count_ptr,
+ classinfo ***classes_ptr);
+#endif
+
#ifndef NDEBUG
void classcache_debug_dump(FILE *file,utf *only);
#endif