Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 61472 invoked from network); 24 Apr 2007 11:15:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Apr 2007 11:15:40 -0000 Received: (qmail 81861 invoked by uid 500); 24 Apr 2007 11:15:45 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 81617 invoked by uid 500); 24 Apr 2007 11:15:45 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 81608 invoked by uid 99); 24 Apr 2007 11:15:45 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 04:15:45 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of alin.harmony@gmail.com designates 64.233.184.234 as permitted sender) Received: from [64.233.184.234] (HELO wr-out-0506.google.com) (64.233.184.234) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Apr 2007 04:15:37 -0700 Received: by wr-out-0506.google.com with SMTP id i31so1926812wra for ; Tue, 24 Apr 2007 04:15:17 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=h5QGc0JAlwb09vjvLFPYEIP62MWD5kv72MHPAk4I8n6xoksA8s4HWPKlqqYK3HiiFVpudB9vANzNMnlpbxL0CoCsp0tSxUY3y30sVsMX9BIgc4n719LZLQi4tuX7GY5OVtImx+6NoMRDG07qsp/HoS8vT9Qj3KyeM2PWYH8eugY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Yu6uzzerSM68Lw/3lZUaf63bt35wxe1lf+unC5xJCdifbu18Br6NiJksRc63Wp1EKxroLHq7E8FuUKDohsgbr4t7nd1u9Hptd/jGiSFNYvRPy/yuemtno/TjbC/Cj3z6xErx4Y1c7FOWe7wBRjFTuWFA0gscsE7oDntT2V+ureE= Received: by 10.78.149.15 with SMTP id w15mr1341791hud.1177413316365; Tue, 24 Apr 2007 04:15:16 -0700 (PDT) Received: by 10.78.201.17 with HTTP; Tue, 24 Apr 2007 04:15:16 -0700 (PDT) Message-ID: <3ae04f990704240415t10d1497bqdd27737a48e5748f@mail.gmail.com> Date: Tue, 24 Apr 2007 07:15:16 -0400 From: "Angela Lin" To: dev@harmony.apache.org Subject: Re: [classlib][compatibility]sun.misc.Unsafe.unpark(Thread) or unpark(Object)? In-Reply-To: <462DBCEE.3050006@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <462DBCEE.3050006@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org On 4/24/07, Tim Ellison wrote: > Yang Paulex wrote: > > I just found by accident that Harmony's sun.misc.Unsafe in suncompat.jar > > is, actually, not so compatible. > > ... > > As you know, Unsafe is not part of the spec, so I expect it was an > oversight. I see no harm in changing the signature of unpark to be more > compatible. We will implement the other other methods as we need them. > > Regards, > Tim > In the IBM VM, we assume that Unsafe.unpark() is always passed a Thread. The incoming object is not type-checked. This assumption was valid in the past and was probably made for performance reasons. It would be safer (from my point of view, at least) to leave the signature as unpark(Thread). I don't think this would cause binary incompatibility, since the native declaration would be unpark(jobject) in any case. If j.u.concurrent is passing non-Thread objects to unpark(), this would be a much more significant problem for us. -- Angela Lin, IBM Ottawa Software Lab