summaryrefslogtreecommitdiffstats
path: root/include/qemu/thread.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2013-05-13 13:29:47 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-02-02 16:55:10 +0100
commit7911747bd46123ef8d8eef2ee49422bb8a4b274f (patch)
treec8411ff290dac6102131bef4c719dfd077381693 /include/qemu/thread.h
parent158ef8cbb7e0fe8bb430310924b8bebe5f186e6e (diff)
downloadhqemu-7911747bd46123ef8d8eef2ee49422bb8a4b274f.zip
hqemu-7911747bd46123ef8d8eef2ee49422bb8a4b274f.tar.gz
rcu: add rcu library
This includes a (mangled) copy of the liburcu code. The main changes are: 1) removing dependencies on many other header files in liburcu; 2) removing for simplicity the tentative busy waiting in synchronize_rcu, which has limited performance effects; 3) replacing futexes in synchronize_rcu with QemuEvents for Win32 portability. The API is the same as liburcu, so it should be possible in the future to require liburcu on POSIX systems for example and use our copy only on Windows. Among the various versions available I chose urcu-mb, which is the least invasive implementation even though it does not have the fastest rcu_read_{lock,unlock} implementation. The urcu flavor can be changed later, after benchmarking. Reviewed-by: Fam Zheng <famz@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qemu/thread.h')
-rw-r--r--include/qemu/thread.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/include/qemu/thread.h b/include/qemu/thread.h
index e89fdc9..5114ec8 100644
--- a/include/qemu/thread.h
+++ b/include/qemu/thread.h
@@ -25,9 +25,6 @@ void qemu_mutex_lock(QemuMutex *mutex);
int qemu_mutex_trylock(QemuMutex *mutex);
void qemu_mutex_unlock(QemuMutex *mutex);
-#define rcu_read_lock() do { } while (0)
-#define rcu_read_unlock() do { } while (0)
-
void qemu_cond_init(QemuCond *cond);
void qemu_cond_destroy(QemuCond *cond);
OpenPOWER on IntegriCloud