Changeset 694ca93f in mainline for kernel/generic/src/mm/as.c


Ignore:
Timestamp:
2011-05-01T19:34:26Z (13 years ago)
Author:
Martin Sucha <sucha14@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0e26444
Parents:
1ff896e (diff), 042fbe0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/mm/as.c

    r1ff896e r694ca93f  
    8080#include <arch/interrupt.h>
    8181
    82 #ifdef CONFIG_VIRT_IDX_DCACHE
    83 #include <arch/mm/cache.h>
    84 #endif /* CONFIG_VIRT_IDX_DCACHE */
    85 
    8682/**
    8783 * Each architecture decides what functions will be used to carry out
     
    447443        else
    448444                memsetb(&area->backend_data, sizeof(area->backend_data), 0);
     445       
     446        if (area->backend && area->backend->create) {
     447                if (!area->backend->create(area)) {
     448                        free(area);
     449                        mutex_unlock(&as->lock);
     450                        return NULL;
     451                }
     452        }
    449453       
    450454        btree_create(&area->used_space);
     
    690694        }
    691695       
     696        if (area->backend && area->backend->resize) {
     697                if (!area->backend->resize(area, pages)) {
     698                        mutex_unlock(&area->lock);
     699                        mutex_unlock(&as->lock);
     700                        return ENOMEM;
     701                }
     702        }
     703       
    692704        area->pages = pages;
    693705       
     
    756768                return ENOENT;
    757769        }
     770
     771        if (area->backend && area->backend->destroy)
     772                area->backend->destroy(area);
    758773       
    759774        uintptr_t base = area->base;
Note: See TracChangeset for help on using the changeset viewer.