All of lore.kernel.org
 help / color / mirror / Atom feed
From: marcandre.lureau@redhat.com
To: qemu-devel@nongnu.org
Cc: "Marek Vasut" <marex@denx.de>, "Kevin Wolf" <kwolf@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-block@nongnu.org, "David Hildenbrand" <david@redhat.com>,
	"Laurent Vivier" <lvivier@redhat.com>,
	"Michael Roth" <michael.roth@amd.com>,
	"Chris Wulff" <crwulff@gmail.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	qemu-ppc@nongnu.org, "Stefan Weil" <sw@weilnetz.de>,
	"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PATCH 4/4] oslib: drop qemu_gettimeofday()
Date: Fri,  4 Mar 2022 19:27:04 +0400	[thread overview]
Message-ID: <20220304152704.3466036-5-marcandre.lureau@redhat.com> (raw)
In-Reply-To: <20220304152704.3466036-1-marcandre.lureau@redhat.com>

From: Marc-André Lureau <marcandre.lureau@redhat.com>

No longer used after the previous patches.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
 include/sysemu/os-posix.h |  3 ---
 include/sysemu/os-win32.h |  6 ------
 util/oslib-win32.c        | 20 --------------------
 3 files changed, 29 deletions(-)

diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h
index 2edf33658a44..c9b1d63fedda 100644
--- a/include/sysemu/os-posix.h
+++ b/include/sysemu/os-posix.h
@@ -52,9 +52,6 @@ int os_mlock(void);
 #define closesocket(s) close(s)
 #define ioctlsocket(s, r, v) ioctl(s, r, v)
 
-typedef struct timeval qemu_timeval;
-#define qemu_gettimeofday(tp) gettimeofday(tp, NULL)
-
 bool is_daemonized(void);
 
 /**
diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h
index 43f569b5c216..4d4be826f48c 100644
--- a/include/sysemu/os-win32.h
+++ b/include/sysemu/os-win32.h
@@ -71,12 +71,6 @@ int getpagesize(void);
 # define EPROTONOSUPPORT EINVAL
 #endif
 
-typedef struct {
-    long tv_sec;
-    long tv_usec;
-} qemu_timeval;
-int qemu_gettimeofday(qemu_timeval *tp);
-
 static inline bool is_daemonized(void)
 {
     return false;
diff --git a/util/oslib-win32.c b/util/oslib-win32.c
index af559ef3398d..7faf59e9aaea 100644
--- a/util/oslib-win32.c
+++ b/util/oslib-win32.c
@@ -265,26 +265,6 @@ void qemu_set_cloexec(int fd)
 {
 }
 
-/* Offset between 1/1/1601 and 1/1/1970 in 100 nanosec units */
-#define _W32_FT_OFFSET (116444736000000000ULL)
-
-int qemu_gettimeofday(qemu_timeval *tp)
-{
-  union {
-    unsigned long long ns100; /*time since 1 Jan 1601 in 100ns units */
-    FILETIME ft;
-  }  _now;
-
-  if(tp) {
-      GetSystemTimeAsFileTime (&_now.ft);
-      tp->tv_usec=(long)((_now.ns100 / 10ULL) % 1000000ULL );
-      tp->tv_sec= (long)((_now.ns100 - _W32_FT_OFFSET) / 10000000ULL);
-  }
-  /* Always return 0 as per Open Group Base Specifications Issue 6.
-     Do not set errno on error.  */
-  return 0;
-}
-
 int qemu_get_thread_id(void)
 {
     return GetCurrentThreadId();
-- 
2.35.1.273.ge6ebfd0e8cbb



  parent reply	other threads:[~2022-03-04 15:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 15:27 [PATCH 0/4] RFC: remove qemu_gettimeofday() marcandre.lureau
2022-03-04 15:27 ` [PATCH 1/4] m68k/nios2-semi: fix gettimeofday() result check marcandre.lureau
2022-03-04 15:45   ` Laurent Vivier
2022-03-04 20:44   ` Richard Henderson
2022-03-04 15:27 ` [PATCH 2/4] qtest: replace gettimeofday with GTimer marcandre.lureau
2022-03-04 15:54   ` Laurent Vivier
2022-03-04 15:55     ` Laurent Vivier
2022-03-04 20:50   ` Richard Henderson
2022-03-04 21:12     ` Marc-André Lureau
2022-03-04 15:27 ` [PATCH 3/4] Replace qemu_gettimeofday() with g_get_real_time() marcandre.lureau
2022-03-04 16:08   ` Laurent Vivier
2022-03-04 16:13     ` Laurent Vivier
2022-03-04 16:48     ` Marc-André Lureau
2022-03-04 20:39   ` BALATON Zoltan
2022-03-04 20:45     ` Marc-André Lureau
2022-03-04 15:27 ` marcandre.lureau [this message]
2022-03-04 16:09   ` [PATCH 4/4] oslib: drop qemu_gettimeofday() Laurent Vivier
2022-03-04 16:21   ` Stefan Weil
2022-03-04 20:58   ` Richard Henderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220304152704.3466036-5-marcandre.lureau@redhat.com \
    --to=marcandre.lureau@redhat.com \
    --cc=armbru@redhat.com \
    --cc=crwulff@gmail.com \
    --cc=david@redhat.com \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=lvivier@redhat.com \
    --cc=marex@denx.de \
    --cc=michael.roth@amd.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=sw@weilnetz.de \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.