aboutsummaryrefslogtreecommitdiff
path: root/include/qemu/osdep.h
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2022-03-23 19:57:27 +0400
committerPaolo Bonzini <pbonzini@redhat.com>2022-04-06 14:31:43 +0200
commit1dacd88ddcf33eb6ed044c4080e3ef5e3de4b6b6 (patch)
treecd4e649da800b91d8b16620c55a8fdcf3bfa4ec3 /include/qemu/osdep.h
parent11fd78dc074a6abed7514a37cbb77f440ab8f410 (diff)
downloadqemu-1dacd88ddcf33eb6ed044c4080e3ef5e3de4b6b6.zip
qemu-1dacd88ddcf33eb6ed044c4080e3ef5e3de4b6b6.tar.gz
qemu-1dacd88ddcf33eb6ed044c4080e3ef5e3de4b6b6.tar.bz2
include: move TFR to osdep.h
The macro requires EINTR, which has its header included in osdep.h. (Not sure what TFR stands for, perhaps "Test For Retry". Rename it ?) Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20220323155743.1585078-17-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/osdep.h')
-rw-r--r--include/qemu/osdep.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 240b487..489a5d1 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -226,6 +226,8 @@ extern "C" {
#define ESHUTDOWN 4099
#endif
+#define TFR(expr) do { if ((expr) != -1) break; } while (errno == EINTR)
+
/* time_t may be either 32 or 64 bits depending on the host OS, and
* can be either signed or unsigned, so we can't just hardcode a
* specific maximum value. This is not a C preprocessor constant,