Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 84503 invoked from network); 16 Nov 2006 22:07:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Nov 2006 22:07:08 -0000 Received: (qmail 50818 invoked by uid 500); 16 Nov 2006 22:07:15 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 50778 invoked by uid 500); 16 Nov 2006 22:07:15 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 50753 invoked by uid 99); 16 Nov 2006 22:07:15 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2006 14:07:15 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Nov 2006 14:07:03 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id A59AC1A984D; Thu, 16 Nov 2006 14:06:31 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r475944 - in /incubator/harmony/enhanced/drlvm/trunk/vm: tests/unit/thread/test_native_fat_monitor.c thread/src/thread_init.c thread/src/thread_native_fat_monitor.c thread/src/thread_native_thin_monitor.c thread/src/thread_ti_monitors.c Date: Thu, 16 Nov 2006 22:06:31 -0000 To: harmony-commits@incubator.apache.org From: gshimansky@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20061116220631.A59AC1A984D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: gshimansky Date: Thu Nov 16 14:06:30 2006 New Revision: 475944 URL: http://svn.apache.org/viewvc?view=rev&rev=475944 Log: Applied HARMONY-2149 [drlvm][threading] hythread_monitor_init() should not acqure a monitor Tests passed on winxp, ubuntu, FC5 and SuSE10 x86_64 (with some exceptions on x86_64) Modified: incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_init.c incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_monitors.c Modified: incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c?view=diff&rev=475944&r1=475943&r2=475944 ============================================================================== --- incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c (original) +++ incubator/harmony/enhanced/drlvm/trunk/vm/tests/unit/thread/test_native_fat_monitor.c Thu Nov 16 14:06:30 2006 @@ -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; Modified: incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_init.c URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_init.c?view=diff&rev=475944&r1=475943&r2=475944 ============================================================================== --- incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_init.c (original) +++ incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_init.c Thu Nov 16 14:06:30 2006 @@ -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. * Modified: incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c?view=diff&rev=475944&r1=475943&r2=475944 ============================================================================== --- incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c (original) +++ incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_fat_monitor.c Thu Nov 16 14:06:30 2006 @@ -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) { @@ -68,9 +67,6 @@ mon->flags = flags; 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; Modified: incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c?view=diff&rev=475944&r1=475943&r2=475944 ============================================================================== --- incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c (original) +++ incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_native_thin_monitor.c Thu Nov 16 14:06:30 2006 @@ -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 Modified: incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_monitors.c URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_monitors.c?view=diff&rev=475944&r1=475943&r2=475944 ============================================================================== --- incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_monitors.c (original) +++ incubator/harmony/enhanced/drlvm/trunk/vm/thread/src/thread_ti_monitors.c Thu Nov 16 14:06:30 2006 @@ -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) {