Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 47350 invoked from network); 29 Jun 2009 02:43:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Jun 2009 02:43:35 -0000 Received: (qmail 36329 invoked by uid 500); 29 Jun 2009 02:43:45 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 36230 invoked by uid 500); 29 Jun 2009 02:43: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 36219 invoked by uid 99); 29 Jun 2009 02:43:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jun 2009 02:43:45 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sean.xx.qiu@gmail.com designates 209.85.221.173 as permitted sender) Received: from [209.85.221.173] (HELO mail-qy0-f173.google.com) (209.85.221.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 Jun 2009 02:43:38 +0000 Received: by qyk3 with SMTP id 3so1289944qyk.20 for ; Sun, 28 Jun 2009 19:43:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=W12qN437C0GSOdk3/bI1yk9jGNJJYvinC4F+pvpMFLA=; b=IK86zrD9Ru0U3sol/QKTPxyQl/gJhVGyEdTlqQRRxVNNshEvb9TfYaEra+rWfarf21 H1cP37aO3864tWXsKcuijoIcl+WlR6dRLAtTXEEIWXZRRy6QR0NSjFK6MZIU/PPMFM/4 olzNGIDGxBCHhEQ+KT0vXDptFSCLlmcr+qEnc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=A7OI9ws2wcT3jj70b8pW82eE+vKHdoceHaqdnrovLCvco+94mYqTL9kLQKoYaDwVIV h77azEokSjUzEipavevfHJ46c0Ni4Gmyt8+BRUaNRDCWFmh1N4L+tjo0kMIsSESLG7m4 savOlrTBImaFwtBpy19LNmf0exK2Gk7BISEvk= MIME-Version: 1.0 Received: by 10.229.84.6 with SMTP id h6mr1492757qcl.19.1246243397173; Sun, 28 Jun 2009 19:43:17 -0700 (PDT) In-Reply-To: <200906282138.n5SLchXB016955@d12av01.megacenter.de.ibm.com> References: <3b3f27c60906280859m350545bdg899c85e77c96d9ec@mail.gmail.com> <200906282138.n5SLchXB016955@d12av01.megacenter.de.ibm.com> From: Sean Qiu Date: Mon, 29 Jun 2009 10:42:57 +0800 Message-ID: <94d710af0906281942r530087bas218d2609820132f7@mail.gmail.com> Subject: Re: porting portlib To: dev@harmony.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Do we have an IBM VME for OS X? :-) Best Regards Sean, Xiao Xia Qiu 2009/6/29 Mark Hindess : > > In message <3b3f27c60906280859m350545bdg899c85e77c96d9ec@mail.gmail.com>, > Nathan Beyer writes: >> >> I've been playing around trying to port the portlib cod to run on >> Mac OS X 10.5. I've been futzing around with the assembly file in >> 'thread', specifically 'thrhelp.s' and 'thrspinlock.s'. I've been >> trying to find the lowest common denominator to work on Linux an OS X, >> but I've finally come to the conclusion that it's just not going to >> happen. Although most of the actual code - the implementations of the >> method are directly portable, the small stuff around it just doesn't >> work. >> >> The main issue revolves around leading underscores being added >> to function names. Apparently, this isn't the default behaviour >> for Linux, but it is on OS X - even though I'm using gcc and gas >> in both case. As such, the function names in the assembly files >> need to be different based on the OS. I've tried fiddling with the >> '-fno-leading-underscores' flag, but this blows up other stuff and >> just seems to be a rat hole. > > Nathan, you are running down the wrong rat hole. > > DRLVM doesn't use the threading code in classlib so fixing it is futile. > DRLVM provides its own libhythr.so - using the src in vm/thread/src. > > I've never understood why we have a hy.thr.nodeploy option for the > classlib thread code. =A0If we aren't going to deploy it, why are we > building it? > > (Aside: the originally contributed assembler code in classlib for > linux/x86 works but the later, Intel-contributed assembler code for > linux/x86_64 links but does not actually work in practice.) > >> At this point, I think it's time to give up on the os.family + os.arch >> separation and change to os.name + os.arch or something else? Any >> thoughts or suggestions on such a change? I'm curious how this stuff >> works on the other unix platforms, such as AIX and BSD. > > Well, the IBM VME for Aix uses the -Dhy.no.thr=3Dtrue option so the > classlib threading code is not used. =A0But when I last tested it the > assembler code for x86 worked on FreeBSD. =A0However, this wouldn't stop > us splitting the code by os.name, we'd just use #include's to share > implementation where possible - much like we do with the hymmap.c code. > > Regards, > =A0Mark. > > >