qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Stefan Weil <sw@weilnetz.de>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	Anthony Liguori <aliguori@amazon.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 9/9] w32: Replace Windows specific data types in common header files
Date: Mon, 24 Feb 2014 14:07:53 +0100	[thread overview]
Message-ID: <530B4429.1020307@suse.de> (raw)
In-Reply-To: <1393174935-11750-10-git-send-email-sw@weilnetz.de>

Am 23.02.2014 18:02, schrieb Stefan Weil:
> These header files are used by most QEMU source files. If they
> depend on windows.h, all those source files do so, too.
> 
> All Windows specific data types which are replaced use identical
> definitions for the 32 and 64 bit Windows APIs. HANDLE and LONG
> can be directly replaced by void * and long. CRITICAL_SECTION
> is replaced by a new struct of the same size.
> 
> Add an explicit dependency on sysemu/os-winapi.h for some files which need it.
> These sources use the Windows API (see comment after include statement)
> and no longer get windows.h indirectly from other header files.
> 
> A workaround which was added in the previous patch is no longer needed.
> 
> Now 175 *.o files remain which still depend on windows.h.
> 
> Cc: Anthony Liguori <aliguori@amazon.com>
> Cc: Stefan Hajnoczi <stefanha@redhat.com>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
[...]
> diff --git a/include/qom/cpu.h b/include/qom/cpu.h
> index 367eda1..6ea48c4 100644
> --- a/include/qom/cpu.h
> +++ b/include/qom/cpu.h

First of all, why was I not CC'ed on this change?
File is listed under "CPU" subsystem in MAINTAINERS.

Patches not getting sufficient review is one risk, causing merge
conflicts another. People should be aware of changes you make in their
files, even if "just" Windows-related.

> @@ -170,7 +170,7 @@ struct CPUState {
>  
>      struct QemuThread *thread;
>  #ifdef _WIN32
> -    HANDLE hThread;
> +    void *hThread;
>  #endif
>      int thread_id;
>      uint32_t host_tid;

I had moved the field unchanged from another header, I believe. I don't
think this is a good change (assuming the Windows API is still using
this type and not void*), especially since it's #ifdef'ed anyway.

And I don't understand why reducing the number of files dependent on
windows.h is a good thing either. Your cover letter does not explain.
We've not been trying to reduce dependencies on glib either, nor is
there precedence for replacing other pointer types elsewhere (e.g.
qemu_irq). Wherever possible, we've been using the most precise pointer
type to let the compiler or static analysis tools help us catch mismatches.

Is all this just to speed up rebuilds after MinGW updates?

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  parent reply	other threads:[~2014-02-24 13:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-23 17:02 [Qemu-devel] [PATCH 0/9] w32: Reduce dependency on Windows API Stefan Weil
2014-02-23 17:02 ` [Qemu-devel] [PATCH 1/9] util/iov: Use qemu/sockets.h instead of conditional code Stefan Weil
2014-02-23 17:02 ` [Qemu-devel] [PATCH 2/9] exec: Remove unneeded include files Stefan Weil
2014-02-23 17:02 ` [Qemu-devel] [PATCH 3/9] qemu-img: " Stefan Weil
2014-02-23 17:02 ` [Qemu-devel] [PATCH 4/9] qga: Remove unneeded include file Stefan Weil
2014-02-23 17:02 ` [Qemu-devel] [PATCH 5/9] vl: " Stefan Weil
2014-02-23 17:02 ` [Qemu-devel] [PATCH 6/9] w32: Add and use intermediate include file for windows.h Stefan Weil
2014-02-24 10:26   ` Paolo Bonzini
2014-02-24 23:00     ` Stefan Weil
2014-02-25  8:18       ` Paolo Bonzini
2014-02-23 17:02 ` [Qemu-devel] [PATCH 7/9] w32: Move inline function from header file to C source Stefan Weil
2014-02-23 17:02 ` [Qemu-devel] [PATCH 8/9] w32: Reduce dependencies in sysemu/os-win32.h Stefan Weil
2014-02-24  0:45   ` Max Filippov
2014-02-23 17:02 ` [Qemu-devel] [PATCH 9/9] w32: Replace Windows specific data types in common header files Stefan Weil
2014-02-24 10:17   ` Kevin Wolf
2014-02-24 13:24     ` Peter Maydell
2014-02-24 13:44       ` Kevin Wolf
2014-02-24 13:51         ` Peter Maydell
2014-02-24 23:12           ` Stefan Weil
2014-02-24 23:17     ` Stefan Weil
2014-02-24 13:07   ` Andreas Färber [this message]
2014-02-24 23:07     ` Stefan Weil
2014-02-25  8:37       ` Andreas Färber
2014-02-26  6:14         ` Stefan Weil
2014-02-27 15:45   ` Stefan Hajnoczi
2014-02-25  5:32 ` [Qemu-devel] [PATCH 0/9] w32: Reduce dependency on Windows API Stefan Weil
2014-02-25  8:20   ` Paolo Bonzini
2014-02-25  8:40     ` Andreas Färber
2014-03-02 13:31 ` Michael Tokarev

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=530B4429.1020307@suse.de \
    --to=afaerber@suse.de \
    --cc=aliguori@amazon.com \
    --cc=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=sw@weilnetz.de \
    /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).