Received: from eggs.gnu.org ([208.118.235.92]:52281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu05f-0006RQ-Bf for qemu-devel@nongnu.org; Sat, 12 Jan 2013 07:21:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tu05Z-00039I-Eh for qemu-devel@nongnu.org; Sat, 12 Jan 2013 07:21:35 -0500 Received: from speedy.comstyle.com ([2001:470:1d:8c::2]:40098 helo=mail.comstyle.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tu05Z-00039E-Aw for qemu-devel@nongnu.org; Sat, 12 Jan 2013 07:21:29 -0500 Date: Sat, 12 Jan 2013 07:21:23 -0500 From: Brad Smith Message-ID: <20130112122122.GI22557@rox.home.comstyle.com> References: <50F055D8.7040505@redhat.com> <50F058E3.4070905@web.de> <20130112090711.GB16980@rox.home.comstyle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] getting rid of coroutine-gthread? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , Andreas F?rber , qemu-devel On Sat, Jan 12, 2013 at 12:08:47PM +0000, Peter Maydell wrote: > On 12 January 2013 09:07, Brad Smith wrote: > > On Fri, Jan 11, 2013 at 07:24:35PM +0100, Andreas F?rber wrote: > >> Am 11.01.2013 19:11, schrieb Paolo Bonzini: > >> > as far as I know OpenBSD and Linux/ARM were the main users of > >> > coroutine-gthread. Do you think we could dump it and rely on > >> > coroutine-sigaltstack only? > >> > >> No, I believe there is explicit code in configure to force the GThread > >> implementation on Mac OS X. > > > > That is to skip over testing for the ucontext implementation. There was > > a build issue with the sigaltstack implementation but it was fixed > > relatively recently. > > Yes. That configure skip code is actually broken because it skips the > test for the ucontext implementation but doesn't actually set the > coroutine_backend variable to anything, so we end up with (a) > a confusing message to the user saying just "coroutine backend" > rather than "coroutine backend foo" and (b) the gthreads backend > more by luck than judgement. Easiest fix here is probably to > replace the 'if darwin' check with an "#ifdef some-darwin-symbol > #error" in the makecontext test program (and incidentally we could > add a comment to the effect that at least some versions of MacOS > provide makecontext but make getcontext always return ENOTSUP; > I had to trawl the mailing list to find out why we did that :-)) > > Even if we don't drop gthreads, I think there's an argument to be > made for having sigcontext be the next backend to try after > ucontext. The ucontext support in OS X has been marked as deprecated, that seems to have popped up with 10.6. No idea if it has been removed all together since then. It was made obsolete in POSIX.1-2001. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.