[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 11/41] qga: replace usleep() with g_usleep()
From: |
marcandre . lureau |
Subject: |
[PATCH 11/41] qga: replace usleep() with g_usleep() |
Date: |
Wed, 20 Apr 2022 17:25:54 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
The latter simply requires glib.h, while the former is not in the
Windows API (but provided by mingw header & CRT)
Also simplify the expression for 1/10s.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
qga/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qga/main.c b/qga/main.c
index 8994f73e4735..b1dae0659d16 100644
--- a/qga/main.c
+++ b/qga/main.c
@@ -609,7 +609,7 @@ static gboolean channel_event_cb(GIOCondition condition,
gpointer data)
* host-side chardev. sleep a bit to mitigate this
*/
if (s->virtio) {
- usleep(100 * 1000);
+ g_usleep(G_USEC_PER_SEC / 10);
}
return true;
default:
--
2.35.1.693.g805e0a68082a
- Re: [PATCH 06/41] include: rename qemu-common.h qemu/copyright.h, (continued)
- [PATCH 07/41] build-sys: remove MSI's QEMU_GA_MSI_MINGW_DLL_PATH, marcandre . lureau, 2022/04/20
- [PATCH 08/41] build-sys: simplify MSI's QEMU_GA_MANUFACTURER, marcandre . lureau, 2022/04/20
- [PATCH 10/41] build-sys: drop MSI's QEMU_GA_DISTRO, marcandre . lureau, 2022/04/20
- [PATCH 09/41] build-sys: simplify MSI's QEMU_GA_VERSION, marcandre . lureau, 2022/04/20
- [PATCH 11/41] qga: replace usleep() with g_usleep(),
marcandre . lureau <=
- [PATCH 12/41] docs: trace-events-all is installed without renaming, marcandre . lureau, 2022/04/20
- [PATCH 14/41] arm/allwinner-a10: replace snprintf() with g_strdup_printf(), marcandre . lureau, 2022/04/20
- [PATCH 13/41] arm/digic: replace snprintf() with g_strdup_printf(), marcandre . lureau, 2022/04/20
- [PATCH 15/41] intc/exynos4210_gic: replace snprintf() with g_strdup_printf(), marcandre . lureau, 2022/04/20
- [PATCH 16/41] doc/style: CLang -> Clang, marcandre . lureau, 2022/04/20