Index: trunk/vm/tests/unit/thread/test_native_fat_monitor.c =================================================================== --- trunk/vm/tests/unit/thread/test_native_fat_monitor.c (revision 473226) +++ trunk/vm/tests/unit/thread/test_native_fat_monitor.c (working copy) @@ -56,7 +56,6 @@ //log_error("BUG IN APR"); //tf_assert(0); status = hythread_monitor_init(&monitor, 0); - status = hythread_monitor_exit(monitor); tf_assert_same(status, TM_ERROR_NONE); waiting_count = 0; Index: trunk/vm/thread/src/thread_init.c =================================================================== --- trunk/vm/thread/src/thread_init.c (revision 473226) +++ trunk/vm/thread/src/thread_init.c (working copy) @@ -188,10 +188,8 @@ mon = (hythread_monitor_t*)hythread_global(GLOBAL_MONITOR_NAME); *mon = p_global_monitor; assert(mon); - status=hythread_monitor_exit(p_global_monitor); - assert (status == TM_ERROR_NONE); - } + /** * Shut down the threading library associated with the current thread. * Index: trunk/vm/thread/src/thread_native_fat_monitor.c =================================================================== --- trunk/vm/thread/src/thread_native_fat_monitor.c (revision 473226) +++ trunk/vm/thread/src/thread_native_fat_monitor.c (working copy) @@ -51,7 +51,6 @@ hythread_monitor_t mon; apr_pool_t *pool = get_local_pool(); apr_status_t apr_status; - IDATA status; mon = apr_pcalloc(pool, sizeof(HyThreadMonitor)); if(mon == NULL) { @@ -69,9 +68,6 @@ mon->name = name; mon->owner = 0; - status=hythread_monitor_enter(mon); - if (status != TM_ERROR_NONE) return status; - *mon_ptr = mon; return TM_ERROR_NONE; } Index: trunk/vm/thread/src/thread_native_thin_monitor.c =================================================================== --- trunk/vm/thread/src/thread_native_thin_monitor.c (revision 473226) +++ trunk/vm/thread/src/thread_native_thin_monitor.c (working copy) @@ -574,17 +574,14 @@ assert (!hythread_is_suspend_enabled()); TRACE (("inflation begin for %x thread: %d", lockword, tm_self_tls->thread_id)); - status = hythread_monitor_init(&fat_monitor, 0); // allocate fat fat_monitor + status = hythread_monitor_init(&fat_monitor, 0); // allocate fat fat_monitor assert(status == TM_ERROR_NONE); + status = hythread_monitor_enter(fat_monitor); if(status != TM_ERROR_NONE) { hymutex_unlock(FAT_MONITOR_TABLE_LOCK); return NULL; } - /* removed due to lock acquisition in monitor creation - * status = hythread_monitor_enter(fat_monitor); // lock fat fat_monitor - * assert(status == TM_ERROR_NONE); - */ for (i = RECURSION(lockword); i > 0; i--) { TRACE( ("infalte recursion monitor")); status = hythread_monitor_enter(fat_monitor); // transfer recusrion count to fat fat_monitor Index: trunk/vm/thread/src/thread_ti_monitors.c =================================================================== --- trunk/vm/thread/src/thread_ti_monitors.c (revision 473226) +++ trunk/vm/thread/src/thread_ti_monitors.c (working copy) @@ -47,9 +47,6 @@ IDATA status; status = hythread_monitor_init(&monitor, 0); if (status != TM_ERROR_NONE) return status; - //hythread monitor init also locks it - status = hythread_monitor_exit(monitor); - if (status != TM_ERROR_NONE) return status; // possibly should be moved to jvmti(environment?) init section //// if (!jvmti_monitor_table) {