summaryrefslogtreecommitdiffstats
path: root/include/qemu/sys_membarrier.h
Commit message (Collapse)AuthorAgeFilesLines
* Normalize header guard symbol definition.Markus Armbruster2019-05-131-1/+1
| | | | | | | | | | | We commonly define the header guard symbol without an explicit value. Normalize the exceptions. Done with scripts/clean-header-guards.pl. Signed-off-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20190315145123.28030-8-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
* membarrier: add --enable-membarrierPaolo Bonzini2018-03-121-0/+10
| | | | | | | | | | | | | Actually enable the global memory barriers if supported by the OS. Because only recent versions of Linux include the support, they are disabled by default. Note that it also has to be disabled for QEMU to run under Wine. Before this patch, rcutorture reports 85 ns/read for my machine, after the patch it reports 12.5 ns/read. On the other hand updates go from 50 *micro*seconds to 20 *milli*seconds. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
* membarrier: introduce qemu/sys_membarrier.hPaolo Bonzini2018-03-121-0/+17
This new header file provides heavy-weight "global" memory barriers that enforce memory ordering on each running thread belonging to the current process. For now, use a dummy implementation that issues memory barriers on both sides (matching what QEMU has been doing so far). Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>