[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1.1] coroutine: Fix setup of sigaltstack corouti
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-devel] [PATCH 1.1] coroutine: Fix setup of sigaltstack coroutines |
Date: |
Thu, 10 May 2012 10:07:04 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
Am 10.05.2012 09:29, schrieb Paolo Bonzini:
> Il 09/05/2012 19:23, Jan Kiszka ha scritto:
>> Use pthread_kill instead of process-wide kill to invoke the signal
>> handler used for stack switching. This may fix spurious lock-ups with
>> this backend, easily triggerable by extending the time window between
>> kill and sigsuspend.
>>
>> Signed-off-by: Jan Kiszka <address@hidden>
>> ---
>> coroutine-sigaltstack.c | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/coroutine-sigaltstack.c b/coroutine-sigaltstack.c
>> index 7ff2d33..b2e316c 100644
>> --- a/coroutine-sigaltstack.c
>> +++ b/coroutine-sigaltstack.c
>> @@ -226,7 +226,7 @@ static Coroutine *coroutine_new(void)
>> * called.
>> */
>> coTS->tr_called = 0;
>> - kill(getpid(), SIGUSR2);
>> + pthread_kill(pthread_self(), SIGUSR2);
>> sigfillset(&sigs);
>> sigdelset(&sigs, SIGUSR2);
>> while (!coTS->tr_called) {
>
> Reviewed-by: Paolo Bonzini <address@hidden>
Thanks, applied to the block branch for 1.1.
Kevin