ret = WaitForMultipleObjects(w->num, w->events, FALSE, *timeout);
ret = WaitForMultipleObjects(w->num, w->events, FALSE, *timeout);
if (WAIT_OBJECT_0 + 0 <= ret && ret <= WAIT_OBJECT_0 + w->num - 1) {
if (w->func[ret - WAIT_OBJECT_0])
w->func[ret - WAIT_OBJECT_0](w->opaque[ret - WAIT_OBJECT_0]);
if (WAIT_OBJECT_0 + 0 <= ret && ret <= WAIT_OBJECT_0 + w->num - 1) {
if (w->func[ret - WAIT_OBJECT_0])
w->func[ret - WAIT_OBJECT_0](w->opaque[ret - WAIT_OBJECT_0]);
/* Note: cpu_interrupt() is currently not SMP safe, so we force
QEMU to run on a single CPU */
HANDLE h;
/* Note: cpu_interrupt() is currently not SMP safe, so we force
QEMU to run on a single CPU */
HANDLE h;
- len = snprintf(buffer, sizeof(buffer), "%ld\n", (long)getpid());
+ len = snprintf(buffer, sizeof(buffer), FMT_pid "\n", getpid());
ret = WriteFileEx(file, (LPCVOID)buffer, (DWORD)len,
&overlap, NULL);
if (ret == 0) {
ret = WriteFileEx(file, (LPCVOID)buffer, (DWORD)len,
&overlap, NULL);
if (ret == 0) {