Changes in kernel/generic/src/mm/as.c [5df1963:2c0b348] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/as.c
r5df1963 r2c0b348 488 488 489 489 /* Eventually check the addresses behind each area */ 490 list_foreach(as->as_area_btree.leaf_list, leaf_link, btree_node_t, node) { 490 list_foreach(as->as_area_btree.leaf_list, cur) { 491 btree_node_t *node = 492 list_get_instance(cur, btree_node_t, leaf_link); 491 493 492 494 for (btree_key_t i = 0; i < node->keys; i++) { … … 670 672 671 673 return NULL; 674 } 675 676 /** UGLY! UGLY! UGLY! */ 677 // TODO: REMOVE ASAP! 678 as_area_t * find_locked_area(as_t *as, uintptr_t va) 679 { 680 return find_area_and_lock(as, va); 672 681 } 673 682 … … 902 911 * reference from all frames found there. 903 912 */ 904 list_foreach(sh_info->pagemap.leaf_list, leaf_link, 905 btree_node_t, node) { 913 list_foreach(sh_info->pagemap.leaf_list, cur) { 914 btree_node_t *node 915 = list_get_instance(cur, btree_node_t, leaf_link); 906 916 btree_key_t i; 907 917 908 918 for (i = 0; i < node->keys; i++) 909 frame_free((uintptr_t) node->value[i] , 1);919 frame_free((uintptr_t) node->value[i]); 910 920 } 911 921 … … 953 963 * Visit only the pages mapped by used_space B+tree. 954 964 */ 955 list_foreach(area->used_space.leaf_list, leaf_link, btree_node_t,956 node) {965 list_foreach(area->used_space.leaf_list, cur) { 966 btree_node_t *node; 957 967 btree_key_t i; 958 968 969 node = list_get_instance(cur, btree_node_t, leaf_link); 959 970 for (i = 0; i < node->keys; i++) { 960 971 uintptr_t ptr = node->key[i]; … … 1234 1245 size_t used_pages = 0; 1235 1246 1236 list_foreach(area->used_space.leaf_list, leaf_link, btree_node_t, 1237 node) { 1247 list_foreach(area->used_space.leaf_list, cur) { 1248 btree_node_t *node 1249 = list_get_instance(cur, btree_node_t, leaf_link); 1238 1250 btree_key_t i; 1239 1251 … … 1259 1271 size_t frame_idx = 0; 1260 1272 1261 list_foreach(area->used_space.leaf_list, leaf_link, btree_node_t, 1262 node) { 1273 list_foreach(area->used_space.leaf_list, cur) { 1274 btree_node_t *node = list_get_instance(cur, btree_node_t, 1275 leaf_link); 1263 1276 btree_key_t i; 1264 1277 … … 1310 1323 frame_idx = 0; 1311 1324 1312 list_foreach(area->used_space.leaf_list, leaf_link, btree_node_t, 1313 node) { 1325 list_foreach(area->used_space.leaf_list, cur) { 1326 btree_node_t *node 1327 = list_get_instance(cur, btree_node_t, leaf_link); 1314 1328 btree_key_t i; 1315 1329 … … 2175 2189 size_t area_cnt = 0; 2176 2190 2177 list_foreach(as->as_area_btree.leaf_list, leaf_link, btree_node_t, 2178 node) { 2191 list_foreach(as->as_area_btree.leaf_list, cur) { 2192 btree_node_t *node = 2193 list_get_instance(cur, btree_node_t, leaf_link); 2179 2194 area_cnt += node->keys; 2180 2195 } … … 2187 2202 size_t area_idx = 0; 2188 2203 2189 list_foreach(as->as_area_btree.leaf_list, leaf_link, btree_node_t, 2190 node) { 2204 list_foreach(as->as_area_btree.leaf_list, cur) { 2205 btree_node_t *node = 2206 list_get_instance(cur, btree_node_t, leaf_link); 2191 2207 btree_key_t i; 2192 2208 … … 2222 2238 2223 2239 /* Print out info about address space areas */ 2224 list_foreach(as->as_area_btree.leaf_list, leaf_link, btree_node_t, 2225 node) { 2240 list_foreach(as->as_area_btree.leaf_list, cur) { 2241 btree_node_t *node 2242 = list_get_instance(cur, btree_node_t, leaf_link); 2226 2243 btree_key_t i; 2227 2244
Note:
See TracChangeset
for help on using the changeset viewer.