summaryrefslogtreecommitdiffstats
path: root/qemu-thread-win32.c
Commit message (Collapse)AuthorAgeFilesLines
* qemu-thread: Let qemu_thread_is_self() return boolAndreas Färber2012-08-021-1/+1
| | | | | | | | qemu_cpu_is_self(), passing the return value through, will later be adapted to return bool as well. Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Stefan Weil <sw@weilnetz.de>
* w32: Initialise critical section before starting thread (fix #922131)Stefan Weil2012-02-071-2/+7
| | | | | | | This patch was contributed by Bogdan Harjoc. I added some assertions. Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Weil <sw@weilnetz.de>
* fix win32 buildPaolo Bonzini2011-12-151-6/+23
| | | | | | | | | | On Windows, cpus.c needs access to the hThread. Add a Windows-specific function to grab it. This requires changing the CPU threads to joinable. There is no substantial change because the threads run in an infinite loop. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-thread: implement joinable threads for Win32Paolo Bonzini2011-12-121-38/+69
| | | | | | | | | | | | Rewrite the handshaking between qemu_thread_create and the win32_start_routine, so that the thread can be joined without races. Similar handshaking is done now between qemu_thread_exit and qemu_thread_join. This also simplifies how QemuThreads are initialized. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* qemu-thread: add API for joinable threadsJan Kiszka2011-12-121-1/+3
| | | | | | | | | | Split from Jan's original qemu-thread-posix.c patch. No semantic change, just introduce the new API that POSIX and Win32 implementations will conform to. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Abort on thread layer errorsJan Kiszka2011-09-211-1/+1
| | | | | | | | Makes it easier to catch the bug in gdb as there is no need to set an explicit breakpoint. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
* Use glib memory allocation and free functionsAnthony Liguori2011-08-201-1/+1
| | | | | | qemu_malloc/qemu_free no longer exist after this commit. Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroyStefan Weil2011-03-191-0/+21
| | | | | | | | | | | | | These functions were missing in commit 9257d46d55f1fe4e8209be9a6870e339ac3266fe. Both functions are needed for compilations with configuration --enable-vnc-thread. Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
* add win32 qemu-thread implementationPaolo Bonzini2011-03-131-0/+260
For now, qemu_cond_timedwait and qemu_mutex_timedlock are left as POSIX-only functions. They can be removed later, once the patches that remove their uses are in. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
OpenPOWER on IntegriCloud