mirror of https://github.com/proxmox/mirror_qemu
coroutine: Fix setup of sigaltstack coroutines
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 <jan.kiszka@siemens.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>master
parent
77f4c9a68a
commit
99b5beba2f
|
@ -226,7 +226,7 @@ static Coroutine *coroutine_new(void)
|
||||||
* called.
|
* called.
|
||||||
*/
|
*/
|
||||||
coTS->tr_called = 0;
|
coTS->tr_called = 0;
|
||||||
kill(getpid(), SIGUSR2);
|
pthread_kill(pthread_self(), SIGUSR2);
|
||||||
sigfillset(&sigs);
|
sigfillset(&sigs);
|
||||||
sigdelset(&sigs, SIGUSR2);
|
sigdelset(&sigs, SIGUSR2);
|
||||||
while (!coTS->tr_called) {
|
while (!coTS->tr_called) {
|
||||||
|
|
Loading…
Reference in New Issue