/* Change Logs: Date Author Notes  GuEe-GUI first version  */
rt_atomic_t rt_hw_atomic_load(volatile rt_atomic_t *ptr)
/* Change Logs: Date Author Notes  GuEe-GUI first version  */
rt_atomic_t rt_hw_atomic_load(volatile rt_atomic_t *ptr)
{
    rt_atomic_t ret;
    __asm__ volatile (
        "   ldr     %0, %1\n"
        "   dmb     ish"
        : "=r" (ret)
        : "Q" (*ptr)
        : "memory");
    return ret;
}