Changes: Christian Thalinger
- $Id: native.c 5066 2006-07-02 18:31:02Z twisti $
+ $Id: native.c 5200 2006-07-31 16:30:33Z twisti $
*/
#include "native/jni.h"
#include "native/native.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 "toolbox/logging.h"
#include "vm/builtin.h"
#include "vm/exceptions.h"
#include "native/include/gnu_classpath_VMStackWalker.h"
#include "native/include/gnu_classpath_VMSystemProperties.h"
+#include "native/include/gnu_java_lang_management_VMClassLoadingMXBeanImpl.h"
+#include "native/include/gnu_java_lang_management_VMMemoryMXBeanImpl.h"
#include "native/include/gnu_java_lang_management_VMRuntimeMXBeanImpl.h"
#include "native/include/java_lang_Class.h"
#include "native/include/java_lang_Object.h"
#include "native/include/java_lang_VMSystem.h"
#include "native/include/java_lang_VMThread.h"
#include "native/include/java_lang_VMThrowable.h"
+#include "native/include/java_lang_management_VMManagementFactory.h"
#include "native/include/java_lang_reflect_Constructor.h"
#include "native/include/java_lang_reflect_Field.h"
#include "native/include/java_lang_reflect_Method.h"
(functionptr) Java_gnu_classpath_VMSystemProperties_preInit,
+ (functionptr) Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_getLoadedClassCount,
+ (functionptr) Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_getUnloadedClassCount,
+ (functionptr) Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_isVerbose,
+ (functionptr) Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_setVerbose,
+
+ (functionptr) Java_gnu_java_lang_management_VMMemoryMXBeanImpl_getHeapMemoryUsage,
+ (functionptr) Java_gnu_java_lang_management_VMMemoryMXBeanImpl_getNonHeapMemoryUsage,
+ (functionptr) Java_gnu_java_lang_management_VMMemoryMXBeanImpl_getObjectPendingFinalizationCount,
+ (functionptr) Java_gnu_java_lang_management_VMMemoryMXBeanImpl_isVerbose,
+ (functionptr) Java_gnu_java_lang_management_VMMemoryMXBeanImpl_setVerbose,
+
(functionptr) Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getInputArguments,
(functionptr) Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getStartTime,
(functionptr) Java_java_lang_VMThrowable_fillInStackTrace,
(functionptr) Java_java_lang_VMThrowable_getStackTrace,
+ (functionptr) Java_java_lang_management_VMManagementFactory_getMemoryPoolNames,
+ (functionptr) Java_java_lang_management_VMManagementFactory_getMemoryManagerNames,
+ (functionptr) Java_java_lang_management_VMManagementFactory_getGarbageCollectorNames,
+
(functionptr) Java_java_lang_reflect_Constructor_getModifiersInternal,
(functionptr) Java_java_lang_reflect_Constructor_constructNative,
u4 key; /* hashkey */
u4 slot; /* slot in hashtable */
-#if defined(ENABLE_THREADS)
- builtin_monitorenter(hashtable_library->header);
-#endif
+ LOCK_MONITOR_ENTER(hashtable_library->header);
/* normally addresses are aligned to 4, 8 or 16 bytes */
while (ne) {
if (ne->name == filename) {
-#if defined(ENABLE_THREADS)
- builtin_monitorexit(hashtable_library->header);
-#endif
+ LOCK_MONITOR_EXIT(hashtable_library->header);
return;
}
ne->hashlink = le->namelink;
le->namelink = ne;
-#if defined(ENABLE_THREADS)
- builtin_monitorexit(hashtable_library->header);
-#endif
+ LOCK_MONITOR_EXIT(hashtable_library->header);
}
#endif /* !defined(WITH_STATIC_CLASSPATH) */