Commit Graph

13 Commits

Author SHA1 Message Date
Jan Kiszka dc7a09cfe4 Expose thread_id in info cpus
Based on patch by Glauber Costa:

To allow management applications like libvirt to apply CPU affinities to
the VCPU threads, expose their ID via info cpus. This patch provides the
pre-existing and used interface from qemu-kvm.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
2011-03-16 17:11:07 -03:00
Paolo Bonzini 9931b2f4c7 unlock iothread during WaitForMultipleObjects
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13 14:44:20 +00:00
Stefan Weil f45a11088b w32: Fix arguments for GetProcessAffinityMask, SetProcessAffinityMask
These functions take arguments of type PDWORD_PTR which is a
pointer to a DWORD_PTR, not a pointer to a DWORD.

Cc: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2011-02-20 18:01:38 +01:00
Jes Sorensen bc4a957c46 Separate qemu_pidfile() into OS specific versions
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-30 08:02:39 +00:00
Stefan Weil 6650b7100b win32: Set unbuffered stdout
Win32 does not support line-buffering, but it allows
unbuffered output.

Unbuffered output is a good approximation. For typical output
statements which usually end with '\n', it's even identical.

Buffered output is unusable for program traces because of
its large delay.

Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-10-09 08:20:39 +00:00
Stefan Weil 0a1574bb13 win32: Add missing function setenv
Mingw32 does not provide a declaration and implementation of function
setenv (which is used in sdl.c), so this patch adds both.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-08-15 09:45:28 +00:00
Jes Sorensen eb505be11b Move daemonize handling to OS specific files
Move daemonize handling from vl.c to OS specific files. Provide dummy
stubs for Win32.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:15 +03:00
Jes Sorensen 59a5264b99 Introduce OS specific cmdline argument handling and move SMB arg to os-posix.c
Introduce OS specific cmdline argument handling by calling
os_parse_cmd_args() at the end of switch() statement. Move option
enum to qemu-options.h and have it included from os-posix.c and
os-win32.c in addition to vl.c.

In addition move SMB argument to os-posix.c

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:15 +03:00
Jes Sorensen 6170540b82 Move find_datadir to OS specific files.
This moves the win32 and POSIX versions of find_datadir() to OS
specific files, and removes some #ifdef clutter from vl.c

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen fe98ac1461 Rename os_setup_signal_handling() to os_setup_early_signal_handling()
Rename os_setup_signal_handling() to os_setup_early_signal_handling()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen 69bd73b1b0 Move win32 early signal handling setup to os_setup_signal_handling()
Move win32 early signal handling setup to os_setup_signal_handling()

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen 0d93ca7c3b vl.c: Move host_main_loop_wait() to OS specific files.
Move host_main_loop_wait() to OS specific files. Create
qemu-os-posix.h and provide empty inline for the POSIX case.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00
Jes Sorensen 19113504de Introduce os-win32.c and move polling functions from vl.c
This introduces os-win32.c. It is meant to carry win32 specific
functions thata are not relevant for all of QEMU as well as win32
versions of various pieces like signal handling etc.

Move win32 polling handler helper functions from vl.c to os-win32.c

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Acked-by: Juan Quintela <quintela@redhat.com>
Acked-by: Richard Henderson <rth@redhat.com>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-06-12 08:49:14 +03:00