Changeset 4c3602c4 in mainline


Ignore:
Timestamp:
2016-09-03T09:49:04Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d776329
Parents:
2c2d54a (diff), d078c9b9 (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 from lp:~jakub/helenos/pager

File:
1 edited

Legend:

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

    r2c2d54a r4c3602c4  
    3939#include <mm/as.h>
    4040#include <mm/page.h>
     41#include <mm/frame.h>
    4142#include <abi/mm/as.h>
    4243#include <abi/ipc/methods.h>
     
    5051
    5152static bool user_create(as_area_t *);
    52 static bool user_resize(as_area_t *, size_t);
    53 static void user_share(as_area_t *);
    5453static void user_destroy(as_area_t *);
    5554
     
    6261mem_backend_t user_backend = {
    6362        .create = user_create,
    64         .resize = user_resize,
    65         .share = user_share,
     63        .resize = NULL,
     64        .share = NULL,
    6665        .destroy = user_destroy,
    6766
     
    8180}
    8281
    83 bool user_resize(as_area_t *area, size_t new_pages)
    84 {
    85         return true;
    86 }
    87 
    88 /** Share the user-paged address space area.
    89  *
    90  * The address space and address space area must be already locked.
    91  *
    92  * @param area Address space area to be shared.
    93  */
    94 void user_share(as_area_t *area)
    95 {
    96         ASSERT(mutex_locked(&area->as->lock));
    97         ASSERT(mutex_locked(&area->lock));
    98 }
    99 
    10082void user_destroy(as_area_t *area)
    10183{
     
    10587bool user_is_resizable(as_area_t *area)
    10688{
    107         return true;
     89        return false;
    10890}
    10991
    11092bool user_is_shareable(as_area_t *area)
    11193{
    112         return true;
     94        return false;
    11395}
    11496
     
    182164        ASSERT(page_table_locked(area->as));
    183165        ASSERT(mutex_locked(&area->lock));
     166
     167        pfn_t pfn = ADDR2PFN(frame);
     168        if (find_zone(pfn, 1, 0) != (size_t) -1) {
     169                frame_free(frame, 1);
     170        } else {
     171                /* Nothing to do */
     172        }
     173               
    184174}
    185175
Note: See TracChangeset for help on using the changeset viewer.