Rev 2647 | Rev 3007 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2647 | Rev 2745 | ||
|---|---|---|---|
| Line 101... | Line 101... | ||
| 101 | 101 | ||
| 102 | mutex_lock(&area->sh_info->lock); |
102 | mutex_lock(&area->sh_info->lock); |
| 103 | frame = (uintptr_t) btree_search(&area->sh_info->pagemap, |
103 | frame = (uintptr_t) btree_search(&area->sh_info->pagemap, |
| 104 | ALIGN_DOWN(addr, PAGE_SIZE) - area->base, &leaf); |
104 | ALIGN_DOWN(addr, PAGE_SIZE) - area->base, &leaf); |
| 105 | if (!frame) { |
105 | if (!frame) { |
| 106 | int i; |
106 | unsigned int i; |
| 107 | 107 | ||
| 108 | /* |
108 | /* |
| 109 | * Workaround for valid NULL address. |
109 | * Workaround for valid NULL address. |
| 110 | */ |
110 | */ |
| 111 | 111 | ||
| Line 288... | Line 288... | ||
| 288 | * Copy used anonymous portions of the area to sh_info's page map. |
288 | * Copy used anonymous portions of the area to sh_info's page map. |
| 289 | */ |
289 | */ |
| 290 | mutex_lock(&area->sh_info->lock); |
290 | mutex_lock(&area->sh_info->lock); |
| 291 | for (cur = &node->leaf_link; cur != &area->used_space.leaf_head; |
291 | for (cur = &node->leaf_link; cur != &area->used_space.leaf_head; |
| 292 | cur = cur->next) { |
292 | cur = cur->next) { |
| 293 | int i; |
293 | unsigned int i; |
| 294 | 294 | ||
| 295 | node = list_get_instance(cur, btree_node_t, leaf_link); |
295 | node = list_get_instance(cur, btree_node_t, leaf_link); |
| 296 | 296 | ||
| 297 | for (i = 0; i < node->keys; i++) { |
297 | for (i = 0; i < node->keys; i++) { |
| 298 | uintptr_t base = node->key[i]; |
298 | uintptr_t base = node->key[i]; |
| 299 | count_t count = (count_t) node->value[i]; |
299 | count_t count = (count_t) node->value[i]; |
| 300 | int j; |
300 | unsigned int j; |
| 301 | 301 | ||
| 302 | /* |
302 | /* |
| 303 | * Skip read-only areas of used space that are backed |
303 | * Skip read-only areas of used space that are backed |
| 304 | * by the ELF image. |
304 | * by the ELF image. |
| 305 | */ |
305 | */ |