Home
last modified time | relevance | path

Searched hist:"81801 f833a1f3af4cf098de75211eea5df924c51" (Results 1 – 1 of 1) sorted by relevance

/optee_os/core/include/
H A Dio.h81801f833a1f3af4cf098de75211eea5df924c51 Mon Sep 03 17:16:08 UTC 2018 Volodymyr Babchuk <vlad.babchuk@gmail.com> io.h: add READ_ONCE macro

Compiler can rearrange memory reads and writes if it does
not see any dependency on them. This can be troublesome
if we deal with memory which is shared with non-secure world.

READ_ONCE macro ensures that compiler will read memory only once.
It is simple wrapper over __compiler_atomic_load(), but it's name
emphasizes it's function.

Signed-off-by: Volodymyr Babchuk <vlad.babchuk@gmail.com>
Reviewed-by: Jens Wiklander <jens.wiklander@linaro.org>