From owner-freebsd-emulation@FreeBSD.ORG Mon Oct 22 02:21:00 2007 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F40516A47C for ; Mon, 22 Oct 2007 02:21:00 +0000 (UTC) (envelope-from mihai.dontu@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by mx1.freebsd.org (Postfix) with ESMTP id BF64013C4E7 for ; Mon, 22 Oct 2007 02:20:57 +0000 (UTC) (envelope-from mihai.dontu@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so855968nfb for ; Sun, 21 Oct 2007 19:20:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:organization:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; bh=vk4gF5N2vsmb8Bq2klv+5SHkPLmxYBk/8jCynCSnI/g=; b=MfKM99U9zg0ugX5I9tRtSeAnFt9P++VHwthlpXqxpUr2VwnqsFISvLbusNHIyuQM7eybqvFsmEPPUt1iPBVD1pXwZpmtaR3Ef5f+1M+e5dQy2piQGHE8vpPthlIt5EMgS1uPyD3/b3y9RlXs8MNErktof+KzTB2w0tq+rmK2ty4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:organization:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=qTxh1i5Acyg07nRGNNipmwVulJKqTFRaKv3tHkeLm00sCw+jld6/Cj3sRM4IMbpuh/nYrU2mpmtheif+6D0x2IXIY7dYmNkfNOG5Y7OiR6HOuMnqHTxYVyAir/VlAPRT33JeDDrYkkLmih4AKze3zNXCZIDB3GB+EPkQI9dGklE= Received: by 10.86.60.7 with SMTP id i7mr2059427fga.1193019651969; Sun, 21 Oct 2007 19:20:51 -0700 (PDT) Received: from ?192.168.0.3? ( [77.81.70.38]) by mx.google.com with ESMTPS id g28sm8824464fkg.2007.10.21.19.20.50 (version=SSLv3 cipher=OTHER); Sun, 21 Oct 2007 19:20:51 -0700 (PDT) From: Mihai =?utf-8?q?Don=C8=9Bu?= Organization: Home To: Tijl Coosemans Date: Mon, 22 Oct 2007 05:20:36 +0300 User-Agent: KMail/1.9.7 References: <200710082135.58099.mihai.dontu@gmail.com> <200710090348.52036.mihai.dontu@gmail.com> <200710101533.06287.tijl@ulyssis.org> In-Reply-To: <200710101533.06287.tijl@ulyssis.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200710220520.37085.mihai.dontu@gmail.com> Cc: freebsd-emulation@freebsd.org, freebsd-questions@freebsd.org, Jung-uk Kim Subject: Re: amd64_set_gsbase() X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2007 02:21:00 -0000 On Wednesday 10 October 2007, Tijl Coosemans wrote: > > To get back to what you are trying to do, because %gs isn't preserved, > > I think you should avoid writing to it and instead strictly use > > amd64_set_gsbase(). But from what you've written, I'm guessing you're > > already doing this, so the next thing to try is to create threads with > > PTHREAD_SCOPE_SYSTEM or use libthr instead of libpthread, because if > > I'm not mistaken, PTHREAD_SCOPE_PROCESS in libpthread doesn't preserve > > gsbase either. > Anyhoo, I'll try to use 'libthr' and see if this helps. ... and success! Indeed: 'amd64_set_gsbase()' + 'libthr.so' = love. 'libpthread.so' is a no-no :) I'm not out of the woods yet, I still have some crashes, but I suspect that's just bad programming on my side. Thanks, -- Mihai Donțu