/* Wait for a new message to arrive in the mbox  */
u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
/* Wait for a new message to arrive in the mbox  */
u32_t sys_arch_mbox_tryfetch(sys_mbox_t *mbox, void **msg)
{
    int ret;
    ret = rt_mb_recv(*mbox, (rt_ubase_t *)msg, 0);
    if(ret == -RT_ETIMEOUT)
        return SYS_ARCH_TIMEOUT;
    else
    {
        if (ret == RT_EOK)
            ret = 1;
    }
    return ret;
}