Subversion Repositories HelenOS

Rev

Rev 2141 | Rev 3382 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2141 Rev 2745
Line 96... Line 96...
96
        mutex_lock(&area->sh_info->lock);
96
        mutex_lock(&area->sh_info->lock);
97
        frame = (uintptr_t) btree_search(&area->sh_info->pagemap,
97
        frame = (uintptr_t) btree_search(&area->sh_info->pagemap,
98
            ALIGN_DOWN(addr, PAGE_SIZE) - area->base, &leaf);
98
            ALIGN_DOWN(addr, PAGE_SIZE) - area->base, &leaf);
99
        if (!frame) {
99
        if (!frame) {
100
            bool allocate = true;
100
            bool allocate = true;
101
            int i;
101
            unsigned int i;
102
           
102
           
103
            /*
103
            /*
104
             * Zero can be returned as a valid frame address.
104
             * Zero can be returned as a valid frame address.
105
             * Just a small workaround.
105
             * Just a small workaround.
106
             */
106
             */
Line 191... Line 191...
191
     */
191
     */
192
    mutex_lock(&area->sh_info->lock);
192
    mutex_lock(&area->sh_info->lock);
193
    for (cur = area->used_space.leaf_head.next;
193
    for (cur = area->used_space.leaf_head.next;
194
        cur != &area->used_space.leaf_head; cur = cur->next) {
194
        cur != &area->used_space.leaf_head; cur = cur->next) {
195
        btree_node_t *node;
195
        btree_node_t *node;
196
        int i;
196
        unsigned int i;
197
       
197
       
198
        node = list_get_instance(cur, btree_node_t, leaf_link);
198
        node = list_get_instance(cur, btree_node_t, leaf_link);
199
        for (i = 0; i < node->keys; i++) {
199
        for (i = 0; i < node->keys; i++) {
200
            uintptr_t base = node->key[i];
200
            uintptr_t base = node->key[i];
201
            count_t count = (count_t) node->value[i];
201
            count_t count = (count_t) node->value[i];
202
            int j;
202
            unsigned int j;
203
           
203
           
204
            for (j = 0; j < count; j++) {
204
            for (j = 0; j < count; j++) {
205
                pte_t *pte;
205
                pte_t *pte;
206
           
206
           
207
                page_table_lock(area->as, false);
207
                page_table_lock(area->as, false);