summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorMORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>2013-02-22 12:39:50 +0900
committerStefan Hajnoczi <stefanha@redhat.com>2013-03-04 09:54:17 +0100
commitbf1c852aa9cbe21beeb7c37d03e167c33ac196b2 (patch)
treed1cf6d722d272b1a42d98a8c5704a843e2bf0a9f /util
parent4ef7b8944cc5eae66159c60066b21466e2dc1ee4 (diff)
move socket_set_nodelay to osdep.c
Signed-off-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/osdep.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util/osdep.c b/util/osdep.c
index 5b51a0322e..c4082610df 100644
--- a/util/osdep.c
+++ b/util/osdep.c
@@ -63,6 +63,12 @@ int socket_set_cork(int fd, int v)
#endif
}
+int socket_set_nodelay(int fd)
+{
+ int v = 1;
+ return setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &v, sizeof(v));
+}
+
int qemu_madvise(void *addr, size_t len, int advice)
{
if (advice == QEMU_MADV_INVALID) {