38template<
typename T >
inline
42 __asm__ __volatile__ (
"" :
"=m"(*
const_cast<T*
>(a)));
44 __asm__ __volatile__ (
"" :
"=m"(*
const_cast<T*
>(a)));
47 return *
static_cast<T
const volatile *
>(a);
69template<
typename T,
typename VAL >
inline
72 __asm__ __volatile__ (
"" :
"=m"(*a));
74 __asm__ __volatile__ (
"" : :
"m"(*a));
void write_now(T *a, VAL &&val)
Write a value at an address exactly once.
T access_once(T const *a)
Read the value at an address at most once.