/* The function will update an existing memory region configuraiton for a thread.  */
rt_err_t rt_mprotect_update_region(rt_thread_t thread, rt_mem_region_t *region)
/* The function will update an existing memory region configuraiton for a thread.  */
rt_err_t rt_mprotect_update_region(rt_thread_t thread, rt_mem_region_t *region)
{
    if (thread == RT_NULL)
    {
        thread = rt_thread_self();
    }
    return rt_hw_mpu_update_region(thread, region);
}