aboutsummaryrefslogtreecommitdiffstats
path: root/qemu-thread.h
AgeCommit message (Collapse)AuthorFilesLines
2011-12-12qemu-thread: add API for joinable threadsJan Kiszka1-2/+6
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>
2011-10-31qemu-queue: Introduce QLIST_INSERT_HEAD_RCU and dummy RCU wrappers.Harsh Prateek Bora1-0/+3
SynthFS needs a QLIST_INSERT_HEAD_RCU to make sure list instructions are not re-ordered and therefore avoiding a crash. There may be parallel readers which should be allowed for lock-free access and this variant allows us to get rid of rwlocks used by readers. SynthFS is a special case where we dont really need full RCU capabilities as it doesnt allow list entry deletion but concurrent readers/writers and instruction re-ordering should not result in a crash. Also, once the real rcu is available, dummy rcu macro definitions will go away and the code will still work as expected. This patchwork is based on inputs from Paolo Bonzini. Signed-off-by: Harsh Prateek Bora <harsh@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2011-04-01qemu-thread.h: include inttypes.hAlon Levy1-0/+2
qemu-thread.h relies on uint64_t being defined, but doesn't include inttypes.h explicitly. This makes it easier to use it from vscclient (part of libcacard).
2011-03-19qemu-thread: delete unused functionsBlue Swirl1-2/+0
qemu_mutex_timedlock() and qemu_cond_timedwait() are no longer used. Remove them and their helper timespec_add_ms(). Reported-by: François Revol <revol@free.fr> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2011-03-13add win32 qemu-thread implementationPaolo Bonzini1-15/+12
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>
2011-03-13Refactor thread retrieval and checkJan Kiszka1-2/+2
We have qemu_cpu_self and qemu_thread_self. The latter is retrieving the current thread, the former is checking for equality (using CPUState). We also have qemu_thread_equal which is only used like qemu_cpu_self. This refactors the interfaces, creating qemu_cpu_is_self and qemu_thread_is_self as well ass qemu_thread_get_self. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2010-07-26qemu-thread: add qemu_mutex/cond_destroy and qemu_mutex_exitCorentin Chary1-0/+4
Add some missing functions in qemu-thread. Currently qemu-thread is only used for io-thread but it will used by the vnc server soon and we need those functions instead of calling pthread directly. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2009-04-24qemu: mutex/thread/cond wrappers and configure tweaks (Marcelo Tosatti)aliguori1-0/+40
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7237 c046a42c-6fe2-441c-8c8c-71466251a162