lib: Add WRITE_ONCE and READ_ONCE implementations in compiler.h
Add the WRITE_ONCE and READ_ONCE macros which are used to prevent the compiler from optimizing a store or a load, respectively, into something else. Cc: Drew Jones <drjones@redhat.com> Cc: Laurent Vivier <lvivier@redhat.com> Cc: Thomas Huth <thuth@redhat.com> Cc: David Hildenbrand <david@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:Alexandru Elisei <alexandru.elisei@arm.com> Reviewed-by:
Andre Przywara <andre.przywara@arm.com> Signed-off-by:
Andrew Jones <drjones@redhat.com>
Loading
Please register or sign in to comment