Revision d25f89c9 qemu-timer.c
b/qemu-timer.c | ||
---|---|---|
831 | 831 |
|
832 | 832 |
#if defined(__linux__) |
833 | 833 |
|
834 |
#include "compatfd.h" |
|
835 |
|
|
834 | 836 |
static int dynticks_start_timer(struct qemu_alarm_timer *t) |
835 | 837 |
{ |
836 | 838 |
struct sigevent ev; |
... | ... | |
850 | 852 |
memset(&ev, 0, sizeof(ev)); |
851 | 853 |
ev.sigev_value.sival_int = 0; |
852 | 854 |
ev.sigev_notify = SIGEV_SIGNAL; |
855 |
#ifdef SIGEV_THREAD_ID |
|
856 |
if (qemu_signalfd_available()) { |
|
857 |
ev.sigev_notify = SIGEV_THREAD_ID; |
|
858 |
ev._sigev_un._tid = qemu_get_thread_id(); |
|
859 |
} |
|
860 |
#endif /* SIGEV_THREAD_ID */ |
|
853 | 861 |
ev.sigev_signo = SIGALRM; |
854 | 862 |
|
855 | 863 |
if (timer_create(CLOCK_REALTIME, &ev, &host_timer)) { |
Also available in: Unified diff