#include <pthread.h>
#include <signal.h>
#include "qemu-common.h"
-#include "qemu-coroutine-int.h"
+#include "block/coroutine_int.h"
enum {
/* Maximum free pool size prevents holding too many freed coroutines */
CoroutineThreadState *coTS;
struct sigaction sa;
struct sigaction osa;
- struct sigaltstack ss;
- struct sigaltstack oss;
+ stack_t ss;
+ stack_t oss;
sigset_t sigs;
sigset_t osigs;
jmp_buf old_env;
* called.
*/
coTS->tr_called = 0;
- kill(getpid(), SIGUSR2);
+ pthread_kill(pthread_self(), SIGUSR2);
sigfillset(&sigs);
sigdelset(&sigs, SIGUSR2);
while (!coTS->tr_called) {
/*
* Now enter the trampoline again, but this time not as a signal
* handler. Instead we jump into it directly. The functionally
- * redundant ping-pong pointer arithmentic is neccessary to avoid
+ * redundant ping-pong pointer arithmetic is necessary to avoid
* type-conversion warnings related to the `volatile' qualifier and
* the fact that `jmp_buf' usually is an array type.
*/