From 20754539e46117131289697598821c0e013b3228 Mon Sep 17 00:00:00 2001 From: Haryslee Date: Mon, 26 Apr 2021 14:39:45 +0800 Subject: [PATCH] remove redundant field regions in VmSpace structure Change-Id: I626a96376fe6bee69b10ee9b56495d62849c19b7 --- kernel/base/include/los_vm_map.h | 3 +-- kernel/base/vm/los_vm_map.c | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/kernel/base/include/los_vm_map.h b/kernel/base/include/los_vm_map.h index 32d6038d..4d998231 100644 --- a/kernel/base/include/los_vm_map.h +++ b/kernel/base/include/los_vm_map.h @@ -107,9 +107,8 @@ struct VmMapRegion { typedef struct VmSpace { LOS_DL_LIST node; /**< vm space dl list */ - LOS_DL_LIST regions; /**< region dl list */ LosRbTree regionRbTree; /**< region red-black tree root */ - LosMux regionMux; /**< region list mutex lock */ + LosMux regionMux; /**< region red-black tree mutex lock */ VADDR_T base; /**< vm space base addr */ UINT32 size; /**< vm space size */ VADDR_T heapBase; /**< vm space heap base address */ diff --git a/kernel/base/vm/los_vm_map.c b/kernel/base/vm/los_vm_map.c index 89790369..3f4010c9 100644 --- a/kernel/base/vm/los_vm_map.c +++ b/kernel/base/vm/los_vm_map.c @@ -132,7 +132,6 @@ STATIC BOOL OsVmSpaceInitCommon(LosVmSpace *vmSpace, VADDR_T *virtTtb) { LOS_RbInitTree(&vmSpace->regionRbTree, OsRegionRbCmpKeyFn, OsRegionRbFreeFn, OsRegionRbGetKeyFn); - LOS_ListInit(&vmSpace->regions); status_t retval = LOS_MuxInit(&vmSpace->regionMux, NULL); if (retval != LOS_OK) { VM_ERR("Create mutex for vm space failed, status: %d", retval);