[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v9 08/20] multi-process: Initialize message handler in remote
From: |
Stefan Hajnoczi |
Subject: |
Re: [PATCH v9 08/20] multi-process: Initialize message handler in remote device |
Date: |
Wed, 23 Sep 2020 15:10:39 +0100 |
This is the function that can be converted from a callback to a
coroutine like this:
void coroutine_fn mpqemu_loop(...)
{
for (;;) {
if (mpqemu_msg_read(...) < 0) {
/* Fatal connection error (disconnected, etc) */
break;
}
if (!mpqemu_msg_valid(&msg)) {
/* Protocol violation, terminate connection */
break;
}
switch (msg.cmd) {
/* Dispatch command */
}
}
}
signature.asc
Description: PGP signature
- Re: [PATCH v9 08/20] multi-process: Initialize message handler in remote device,
Stefan Hajnoczi <=