qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Re: [PATCH v2 upstream 19/22] move blocking of signals to q


From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH v2 upstream 19/22] move blocking of signals to qemu_signalfd_init
Date: Sun, 27 Feb 2011 16:07:54 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7

On 02/27/2011 10:41 AM, Jan Kiszka wrote:
>  +#ifdef CONFIG_IOTHREAD
>  +    /* SIGUSR2 used by posix-aio-compat.c */
>  +    sigemptyset(&set);
>  +    sigaddset(&set, SIGUSR2);
>  +    pthread_sigmask(SIG_UNBLOCK,&set, NULL);

Didn't you want to rename the function for the sake of non-signalfd
blocks like above?

Right.

>  +
>  +    sigemptyset(&set);
>  +    sigaddset(&set, SIGIO);
>  +    sigaddset(&set, SIGALRM);
>  +    sigaddset(&set, SIG_IPI);
>  +    sigaddset(&set, SIGBUS);
>  +    pthread_sigmask(SIG_BLOCK,&set, NULL);
>  +#else
>  +    sigemptyset(&set);

This line is shared and can be moved out of the #ifdef.

It's shared but for different purposes (UNBLOCK for iothread, BLOCK/signalfd for !iothread), so I decided not to hoist it out.

Paolo



reply via email to

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