Changeset d078c9b9 in mainline
- Timestamp:
- 2016-09-02T19:48:36Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4c3602c4
- Parents:
- 3233adb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/backend_user.c
r3233adb rd078c9b9 39 39 #include <mm/as.h> 40 40 #include <mm/page.h> 41 #include <mm/frame.h> 41 42 #include <abi/mm/as.h> 42 43 #include <abi/ipc/methods.h> … … 50 51 51 52 static bool user_create(as_area_t *); 52 static bool user_resize(as_area_t *, size_t);53 static void user_share(as_area_t *);54 53 static void user_destroy(as_area_t *); 55 54 … … 62 61 mem_backend_t user_backend = { 63 62 .create = user_create, 64 .resize = user_resize,65 .share = user_share,63 .resize = NULL, 64 .share = NULL, 66 65 .destroy = user_destroy, 67 66 … … 81 80 } 82 81 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 100 82 void user_destroy(as_area_t *area) 101 83 { … … 105 87 bool user_is_resizable(as_area_t *area) 106 88 { 107 return true;89 return false; 108 90 } 109 91 110 92 bool user_is_shareable(as_area_t *area) 111 93 { 112 return true;94 return false; 113 95 } 114 96 … … 182 164 ASSERT(page_table_locked(area->as)); 183 165 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 184 174 } 185 175
Note:
See TracChangeset
for help on using the changeset viewer.