mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-09-02 06:51:53 -06:00

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>
17 lines
405 B
C
17 lines
405 B
C
/*
|
|
* Process-global memory barriers
|
|
*
|
|
* Copyright (c) 2018 Red Hat, Inc.
|
|
*
|
|
* Author: Paolo Bonzini <pbonzini@redhat.com>
|
|
*/
|
|
|
|
#ifndef QEMU_SYS_MEMBARRIER_H
|
|
#define QEMU_SYS_MEMBARRIER_H 1
|
|
|
|
/* Keep it simple, execute a real memory barrier on both sides. */
|
|
static inline void smp_mb_global_init(void) {}
|
|
#define smp_mb_global() smp_mb()
|
|
#define smp_mb_placeholder() smp_mb()
|
|
|
|
#endif
|