locking. Renamed member header to mutex.
* src/vm/suck.c: Adapted to above change.
* src/vm/loader.cpp: Likewise.
* src/native/vm/cldc1.1/com_sun_cldc_io_ResourceInputStream.cpp: Likewise.
# include "native/include/com_sun_cldc_io_ResourceInputStream.h"
#endif
-#include "threads/lock-common.h"
+#include "threads/mutex.hpp"
#include "vm/jit/builtin.hpp"
#include "vm/exceptions.hpp"
if (lce->type == CLASSPATH_ARCHIVE) {
/* enter a monitor on zip/jar archives */
- LOCK_MONITOR_ENTER(lce);
+ lce->mutex->lock();
/* try to get the file in current archive */
descriptor = zip_read_resource(lce, uname);
/* leave the monitor */
- LOCK_MONITOR_EXIT(lce);
+ lce->mutex->unlock();
if (descriptor != NULL) { /* file exists */
break;
#include "native/llni.h"
-#include "threads/lock-common.h"
#include "threads/mutex.hpp"
#include "toolbox/hashtable.h"
for (lce = (list_classpath_entry*) list_first(list_classpath_entries); lce != NULL;
lce = (list_classpath_entry*) list_next(list_classpath_entries, lce)) {
if (lce->type == CLASSPATH_ARCHIVE)
- LOCK_INIT_OBJECT_LOCK(lce);
+ lce->mutex = new Mutex();
}
#endif
#include "mm/memory.h"
-#include "threads/lock-common.h"
+#include "threads/mutex.hpp"
#include "toolbox/list.h"
#include "toolbox/logging.h"
/* enter a monitor on zip/jar archives */
- LOCK_MONITOR_ENTER(lce);
+ Mutex_lock(lce->mutex);
/* try to get the file in current archive */
/* leave the monitor */
- LOCK_MONITOR_EXIT(lce);
+ Mutex_unlock(lce->mutex);
} else {
#endif /* defined(ENABLE_ZLIB) */
#include "vm/types.h"
+#include "threads/mutex.hpp"
+
#include "toolbox/hashtable.h"
#include "toolbox/list.h"
struct list_classpath_entry {
#if defined(ENABLE_THREADS)
- java_object_t header; /* monitor locking on zip/jar files */
+ Mutex *mutex; /* mutex locking on zip/jar files */
#endif
s4 type;
char *path;