From: Stefan Weil <sw@weilnetz.de>
To: marcandre.lureau@redhat.com, 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>,
Hanna Reitz <hreitz@redhat.com>,
qemu-ppc@nongnu.org, Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 4/4] oslib: drop qemu_gettimeofday()
Date: Fri, 4 Mar 2022 17:21:11 +0100 [thread overview]
Message-ID: <2b349e85-c65f-32f1-d0e4-f32a7b2cb30e@weilnetz.de> (raw)
In-Reply-To: <20220304152704.3466036-5-marcandre.lureau@redhat.com>
[-- Attachment #1.1.1: Type: text/plain, Size: 2395 bytes --]
Am 04.03.22 um 16:27 schrieb 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();
Reviewed-by: Stefan Weil <sw@weilnetz.de>
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 15123 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]
next prev parent reply other threads:[~2022-03-04 16:24 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 ` [PATCH 4/4] oslib: drop qemu_gettimeofday() marcandre.lureau
2022-03-04 16:09 ` Laurent Vivier
2022-03-04 16:21 ` Stefan Weil [this message]
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=2b349e85-c65f-32f1-d0e4-f32a7b2cb30e@weilnetz.de \
--to=sw@weilnetz.de \
--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=marcandre.lureau@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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).