qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] getting rid of coroutine-gthread?


From: Peter Maydell
Subject: Re: [Qemu-devel] getting rid of coroutine-gthread?
Date: Sat, 12 Jan 2013 12:08:47 +0000

On 12 January 2013 09:07, Brad Smith <address@hidden> 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.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]