qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v3 0/9] Re-factor osdep code + macro and brace fixes
@ 2010-10-18  8:15 Jes.Sorensen
  2010-10-18  8:15 ` [Qemu-devel] [PATCH 1/9] Move QEMU OS dependant library functions to OS specific files Jes.Sorensen
                   ` (9 more replies)
  0 siblings, 10 replies; 17+ messages in thread
From: Jes.Sorensen @ 2010-10-18  8:15 UTC (permalink / raw)
  To: qemu-devel; +Cc: blauwirbel, pbonzini

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Hi,

Here is another set of patches which tries to split up osdep.c further
into posix and win32 versions. It introduces oslib-{posix,win32}.c
files which are used for functions that are OS specific core library
functionality, like gettimeofday(), and which is used by both QEMU and
support applications like qemu-img. Other functions are moved to
os-{posix,win32}.c. In addtion there are a couple of minor fixes for
bad macro names.

In some cases braces were added to code when it was moved, to make it
compliant with the QEMU bracing rules.

v3 fixes the issues pointed out by Blue Swirl, notably it moves the
win32 ffs prototype to qemu-common.h which is consistent with it being
provided by strings.h for POSIX, and fixes linking of linux-user.

Cheers,
Jes

Jes Sorensen (9):
  Move QEMU OS dependant library functions to OS specific files
  Move osdep socket code to oslib-{posix,win32}.c
  qemu_pipe() is used only by POSIX code, so move to oslib-posix.c
  We only support eventfd under POSIX, move qemu_eventfd() to
    os-posix.c
  Move qemu_gettimeofday() to OS specific files
  Do not redefine reserved key-words TRUE/FALSE
  Separate qemu_pidfile() into OS specific versions
  Consolidate oom_check() functions
  Remove unncessary includes

 Makefile           |    6 +-
 Makefile.objs      |    9 ++-
 Makefile.target    |    2 +-
 hw/bt-sdp.c        |   20 ++--
 os-posix.c         |   53 +++++++++++
 os-win32.c         |   24 +++++
 osdep.c            |  256 ----------------------------------------------------
 osdep.h            |   15 ---
 oslib-posix.c      |  109 ++++++++++++++++++++++
 oslib-win32.c      |  121 +++++++++++++++++++++++++
 posix-aio-compat.c |    1 +
 qemu-common.h      |    6 ++
 qemu-img.c         |    1 +
 qemu-malloc.c      |   14 +---
 qemu-os-posix.h    |    3 +
 qemu-os-win32.h    |    8 ++
 qemu-tool.c        |    1 +
 17 files changed, 352 insertions(+), 297 deletions(-)
 create mode 100644 oslib-posix.c
 create mode 100644 oslib-win32.c

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [Qemu-devel] [PATCH v4 0/9] Re-factor osdep code + macro and brace fixes
@ 2010-10-26  8:39 Jes.Sorensen
  2010-10-26  8:39 ` [Qemu-devel] [PATCH 8/9] Consolidate oom_check() functions Jes.Sorensen
  0 siblings, 1 reply; 17+ messages in thread
From: Jes.Sorensen @ 2010-10-26  8:39 UTC (permalink / raw)
  To: qemu-devel; +Cc: blauwirbel

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Hi,

Here is another set of patches which tries to split up osdep.c further
into posix and win32 versions. It introduces oslib-{posix,win32}.c
files which are used for functions that are OS specific core library
functionality, like gettimeofday(), and which is used by both QEMU and
support applications like qemu-img. Other functions are moved to
os-{posix,win32}.c. In addtion there are a couple of minor fixes for
bad macro names.

In some cases braces were added to code when it was moved, to make it
compliant with the QEMU bracing rules.

v4 fixes the build problem for m68k-linux-user reported by Blue Swirl.

Cheers,
Jes


Jes Sorensen (9):
  Move QEMU OS dependant library functions to OS specific files
  Move osdep socket code to oslib-{posix,win32}.c
  qemu_pipe() is used only by POSIX code, so move to oslib-posix.c
  We only support eventfd under POSIX, move qemu_eventfd() to
    os-posix.c
  Move qemu_gettimeofday() to OS specific files
  Do not redefine reserved key-words TRUE/FALSE
  Separate qemu_pidfile() into OS specific versions
  Consolidate oom_check() functions
  Remove unncessary includes

 Makefile           |    6 +-
 Makefile.objs      |    9 ++-
 Makefile.target    |    2 +-
 hw/bt-sdp.c        |   20 ++--
 m68k-semi.c        |    2 +-
 os-posix.c         |   53 +++++++++++
 os-win32.c         |   24 +++++
 osdep.c            |  256 ----------------------------------------------------
 osdep.h            |   15 ---
 oslib-posix.c      |  109 ++++++++++++++++++++++
 oslib-win32.c      |  121 +++++++++++++++++++++++++
 posix-aio-compat.c |    1 +
 qemu-common.h      |    6 ++
 qemu-img.c         |    1 +
 qemu-malloc.c      |   14 +---
 qemu-os-posix.h    |    3 +
 qemu-os-win32.h    |    8 ++
 qemu-tool.c        |    1 +
 18 files changed, 353 insertions(+), 298 deletions(-)
 create mode 100644 oslib-posix.c
 create mode 100644 oslib-win32.c

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [Qemu-devel] [PATCH v2 0/9] Re-factor osdep code + macro and brace fixes
@ 2010-10-16 16:04 Jes.Sorensen
  2010-10-16 16:04 ` [Qemu-devel] [PATCH 8/9] Consolidate oom_check() functions Jes.Sorensen
  0 siblings, 1 reply; 17+ messages in thread
From: Jes.Sorensen @ 2010-10-16 16:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: blauwirbel, pbonzini

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Hi,

Here is another set of patches which tries to split up osdep.c further
into posix and win32 versions. It introduces oslib-{posix,win32}.c
files which are used for functions that are OS specific core library
functionality, like gettimeofday(), and which is used by both QEMU and
support applications like qemu-img. Other functions are moved to
os-{posix,win32}.c. In addtion there are a couple of minor fixes for
bad macro names.

In some cases braces were added to code when it was moved, to make it
compliant with the QEMU bracing rules.

v2 fixes the issues pointed out by Paolo and Blue Swirl, as well as
reorganizes the code slightly to make the patches build incrementally
using mingw32 for win32.

Cheers,
Jes

Jes Sorensen (9):
  Move QEMU OS dependant library functions to OS specific files
  Move osdep socket code to oslib-{posix,win32}.c
  qemu_pipe() is used only by POSIX code, so move to oslib-posix.c
  We only support eventfd under POSIX, move qemu_eventfd() to
    os-posix.c
  Move qemu_gettimeofday() to OS specific files
  Do not redefine reserved key-words TRUE/FALSE
  Separate qemu_pidfile() into OS specific versions
  Consolidate oom_check() functions
  Remove unncessary includes

 Makefile           |    6 +-
 Makefile.objs      |    9 ++-
 hw/bt-sdp.c        |   21 +++--
 os-posix.c         |   53 +++++++++++
 os-win32.c         |   24 +++++
 osdep.c            |  256 ----------------------------------------------------
 osdep.h            |   15 ---
 oslib-posix.c      |  109 ++++++++++++++++++++++
 oslib-win32.c      |  121 +++++++++++++++++++++++++
 posix-aio-compat.c |    1 +
 qemu-common.h      |    1 +
 qemu-img.c         |    1 +
 qemu-malloc.c      |   14 +---
 qemu-os-posix.h    |    3 +
 qemu-os-win32.h    |    9 ++
 qemu-tool.c        |    1 +
 16 files changed, 348 insertions(+), 296 deletions(-)
 create mode 100644 oslib-posix.c
 create mode 100644 oslib-win32.c

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 17+ messages in thread
* [Qemu-devel] [PATCH 0/9] Re-factor osdep code + macro and brace fixes
@ 2010-10-15 14:05 Jes.Sorensen
  2010-10-15 14:05 ` [Qemu-devel] [PATCH 8/9] Consolidate oom_check() functions Jes.Sorensen
  0 siblings, 1 reply; 17+ messages in thread
From: Jes.Sorensen @ 2010-10-15 14:05 UTC (permalink / raw)
  To: qemu-devel

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Hi,

Here is another set of patches which tries to split up osdep.c further
into posix and win32 versions. It introduces os-{posix,win32}-lib.c
files which are used for functions that are OS specific core library
functionality, like gettimeofday(), and which is used by both QEMU and
support applications like qemu-img. Other functions are moved to
os-{posix,win32}.c. In addtion there are a couple of minor fixes for
bad macro names.

In some cases braces were added to code when it was moved, to make it
compliant with the QEMU bracing rules.

Cheers,
Jes


Jes Sorensen (9):
  Move QEMU OS dependant library functions to OS specific files
  Move osdep socket code to os-{posix,win32}-lib.c
  qemu_pipe() is used only by POSIX code, so move to os-posix-lib.c
  We only support eventfd under POSIX, move qemu_eventfd() to
    os-posix.c
  Move qemu_gettimeofday() to OS specific files
  Do not redefine reserved key-words TRUE/FALSE
  Separate qemu_pidfile() into OS specific versions
  Consolidate oom_check() functions
  Remove unncessary includes

 Makefile           |    6 +-
 Makefile.objs      |    9 ++-
 hw/bt-sdp.c        |   21 +++--
 os-posix-lib.c     |  111 +++++++++++++++++++++++
 os-posix.c         |   53 +++++++++++
 os-win32-lib.c     |  128 ++++++++++++++++++++++++++
 os-win32.c         |   24 +++++
 osdep.c            |  256 ----------------------------------------------------
 osdep.h            |   15 ---
 posix-aio-compat.c |    1 +
 qemu-common.h      |    1 +
 qemu-img.c         |    1 +
 qemu-malloc.c      |   14 +---
 qemu-os-posix.h    |    3 +
 qemu-os-win32.h    |    9 ++
 qemu-tool.c        |    1 +
 16 files changed, 357 insertions(+), 296 deletions(-)
 create mode 100644 os-posix-lib.c
 create mode 100644 os-win32-lib.c

-- 
1.7.2.3

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-10-26  8:39 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-18  8:15 [Qemu-devel] [PATCH v3 0/9] Re-factor osdep code + macro and brace fixes Jes.Sorensen
2010-10-18  8:15 ` [Qemu-devel] [PATCH 1/9] Move QEMU OS dependant library functions to OS specific files Jes.Sorensen
2010-10-18  8:15 ` [Qemu-devel] [PATCH 2/9] Move osdep socket code to oslib-{posix, win32}.c Jes.Sorensen
2010-10-18  8:15 ` [Qemu-devel] [PATCH 3/9] qemu_pipe() is used only by POSIX code, so move to oslib-posix.c Jes.Sorensen
2010-10-18  8:15 ` [Qemu-devel] [PATCH 4/9] We only support eventfd under POSIX, move qemu_eventfd() to os-posix.c Jes.Sorensen
2010-10-18  8:15 ` [Qemu-devel] [PATCH 5/9] Move qemu_gettimeofday() to OS specific files Jes.Sorensen
2010-10-23 14:42   ` [Qemu-devel] " Blue Swirl
2010-10-25  7:39     ` Jes Sorensen
2010-10-25 17:01       ` Blue Swirl
2010-10-18  8:15 ` [Qemu-devel] [PATCH 6/9] Do not redefine reserved key-words TRUE/FALSE Jes.Sorensen
2010-10-18  8:15 ` [Qemu-devel] [PATCH 7/9] Separate qemu_pidfile() into OS specific versions Jes.Sorensen
2010-10-18  8:15 ` [Qemu-devel] [PATCH 8/9] Consolidate oom_check() functions Jes.Sorensen
2010-10-18  8:15 ` [Qemu-devel] [PATCH 9/9] Remove unncessary includes Jes.Sorensen
2010-10-18  9:08 ` [Qemu-devel] Re: [PATCH v3 0/9] Re-factor osdep code + macro and brace fixes Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2010-10-26  8:39 [Qemu-devel] [PATCH v4 " Jes.Sorensen
2010-10-26  8:39 ` [Qemu-devel] [PATCH 8/9] Consolidate oom_check() functions Jes.Sorensen
2010-10-16 16:04 [Qemu-devel] [PATCH v2 0/9] Re-factor osdep code + macro and brace fixes Jes.Sorensen
2010-10-16 16:04 ` [Qemu-devel] [PATCH 8/9] Consolidate oom_check() functions Jes.Sorensen
2010-10-15 14:05 [Qemu-devel] [PATCH 0/9] Re-factor osdep code + macro and brace fixes Jes.Sorensen
2010-10-15 14:05 ` [Qemu-devel] [PATCH 8/9] Consolidate oom_check() functions Jes.Sorensen

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).