qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2] Replace all setjmp()/longjmp() with sigsetjm


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v2] Replace all setjmp()/longjmp() with sigsetjmp()/siglongjmp()
Date: Wed, 20 Feb 2013 15:49:00 +0000

On 20 February 2013 15:46, Laszlo Ersek <address@hidden> wrote:
> On 02/20/13 16:21, Peter Maydell wrote:
>
>> +#define sigjmp_buf jmp_buf
>> +#define sigsetjmp(env, savemask) setjmp(env)
>> +#define siglongjmp(env, val) longjmp(env, val)
>
> Apologies for not really reviewing v1; do you think it would be useful
> to add parens around "env" and "val" in the siglongjmp() replacement text?

Fractional increase in clarity perhaps, but it isn't necessary
AIUI.

> Also, maybe it would be cleaner to replace these windows-oriented
> #defines with a commonly used, new set of macros that would expand to
> sig* and ", 0" on non-windows, and to the current text on windows.

I thought about that but I think in general we should prefer
to just use the POSIX interface when one is available, with
fixups for non-POSIX platforms. (I don't feel hugely strongly
either way, though.)

-- PMM



reply via email to

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