Lines Matching refs:thread

19 #define MEM_REGION_TO_MPU_INDEX(thread, region) ((((rt_size_t)region - (rt_size_t)(thread->mem_regi…  argument
21 extern rt_mem_region_t *rt_mprotect_find_free_region(rt_thread_t thread);
22 extern rt_mem_region_t *rt_mprotect_find_region(rt_thread_t thread, rt_mem_region_t *region);
179 rt_err_t rt_hw_mpu_add_region(rt_thread_t thread, rt_mem_region_t *region) in rt_hw_mpu_add_region() argument
194 if (thread == RT_NULL) in rt_hw_mpu_add_region()
199 free_region = rt_mprotect_find_free_region(thread); in rt_hw_mpu_add_region()
207 if (thread == rt_thread_self()) in rt_hw_mpu_add_region()
209 index = MEM_REGION_TO_MPU_INDEX(thread, free_region); in rt_hw_mpu_add_region()
216 rt_err_t rt_hw_mpu_delete_region(rt_thread_t thread, rt_mem_region_t *region) in rt_hw_mpu_delete_region() argument
220 rt_mem_region_t *found_region = rt_mprotect_find_region(thread, region); in rt_hw_mpu_delete_region()
228 if (thread == rt_thread_self()) in rt_hw_mpu_delete_region()
230 index = MEM_REGION_TO_MPU_INDEX(thread, found_region); in rt_hw_mpu_delete_region()
237 rt_err_t rt_hw_mpu_update_region(rt_thread_t thread, rt_mem_region_t *region) in rt_hw_mpu_update_region() argument
251 rt_mem_region_t *old_region = rt_mprotect_find_region(thread, region); in rt_hw_mpu_update_region()
259 if (thread == rt_thread_self()) in rt_hw_mpu_update_region()
261 index = MEM_REGION_TO_MPU_INDEX(thread, old_region); in rt_hw_mpu_update_region()
274 void rt_hw_mpu_table_switch(rt_thread_t thread) in rt_hw_mpu_table_switch() argument
279 if (thread->mem_regions != RT_NULL) in rt_hw_mpu_table_switch()
283 if (((rt_mem_region_t *)thread->mem_regions)[i].size != 0U) in rt_hw_mpu_table_switch()
285 …ARM_MPU_SetRegion(index, ((rt_mem_region_t *)thread->mem_regions)[i].attr.rbar, ((rt_mem_region_t … in rt_hw_mpu_table_switch()
292 if ((exclusive_regions[i].owner != RT_NULL) && (exclusive_regions[i].owner != thread)) in rt_hw_mpu_table_switch()
311 info.thread = rt_thread_self(); in MemManage_Handler()
325 if (info.thread->mem_regions != RT_NULL) in MemManage_Handler()
329 …((((rt_mem_region_t *)info.thread->mem_regions)[i].size != 0U) && ADDR_IN_REGION(info.addr, &(((rt… in MemManage_Handler()
331 …rt_memcpy(&(info.region), &(((rt_mem_region_t *)info.thread->mem_regions)[i]), sizeof(rt_mem_regio… in MemManage_Handler()