Revision 79758e95
b/hw/virtio.c | ||
---|---|---|
23 | 23 |
/* QEMU doesn't strictly need write barriers since everything runs in |
24 | 24 |
* lock-step. We'll leave the calls to wmb() in though to make it obvious for |
25 | 25 |
* KVM or if kqemu gets SMP support. |
26 |
* In any case, we must prevent the compiler from reordering the code. |
|
27 |
* TODO: we likely need some rmb()/mb() as well. |
|
26 | 28 |
*/ |
27 |
#define wmb() do { } while (0) |
|
29 |
|
|
30 |
#define wmb() __asm__ __volatile__("": : :"memory") |
|
28 | 31 |
|
29 | 32 |
typedef struct VRingDesc |
30 | 33 |
{ |
Also available in: Unified diff