Commit Graph

6 Commits

Author SHA1 Message Date
Paolo Bonzini 737e150e89 block: move include files to include/block/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2012-12-19 08:31:31 +01:00
Peter Maydell d1b719e98c coroutine-gthread.c: Avoid threading APIs deprecated in GLib 2.31
The GLib threading APIs were revamped in GLib 2.31 and a number
of the old interfaces were deprecated, which means they provoke
compilation warnings (errors if -Werror) now. Add support for the
new interfaces while retaining the old ones so we can still compile
on older versions of GLib too.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2012-04-14 10:59:14 +00:00
Alon Levy 42ed372753 g_thread_init users: don't call it if glib >= 2.31
since commit f9b29ca03 included in release 2.31 (docs below say 2.32 but
that is not correct) and onwards g_thread_init is deprecated and calling
it is not required:

 http://developer.gnome.org/glib/unstable/glib-Deprecated-Thread-APIs.html#g-thread-init

 g_thread_init has been deprecated since version 2.32 and should not be
 used in newly-written code. This function is no longer necessary. The
 GLib threading system is automatically initialized at the start of your
 program.

Fixes bulid failure when warnings are treated as errors on fedora 17.

I only tested the change to vl.c, and copy pasted to the two other
locations (couldn't decide if a wrapper for calling g_thread_init is
uglier).

Signed-off-by: Alon Levy <alevy@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-12-20 15:44:31 -06:00
Blue Swirl 58a06675d3 Convert last qemu_free and qemu_malloc uses
7267c0947d missed
a few cases, fix them.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-08-21 18:42:08 +00:00
Anthony Liguori 7267c0947d Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2011-08-20 23:01:08 -05:00
Aneesh Kumar K.V d0e2fce536 coroutine: implement coroutines using gthread
On platforms that don't support makecontext(3) use gthread based
coroutine implementation.

Darwin has makecontext(3) but getcontext(3) is stubbed out to return
ENOTSUP.  Andreas Färber <andreas.faerber@web.de> debugged this and
contributed the ./configure test which solves the issue for Darwin/ppc64
(and ppc) v10.5.

[Original patch by Aneesh, made consistent with coroutine-ucontext.c and
switched to GStaticPrivate by Stefan.  Tested on Linux and OpenBSD.]

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
2011-08-01 12:14:09 +02:00