Changeset ada559c in mainline
- Timestamp:
- 2010-05-30T21:11:39Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a820bf7
- Parents:
- c8e99bb
- Location:
- kernel
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/as_ht.c
rc8e99bb rada559c 51 51 static void ht_lock(as_t *, bool); 52 52 static void ht_unlock(as_t *, bool); 53 static bool ht_locked(as_t *); 53 54 54 55 as_operations_t as_ht_operations = { … … 57 58 .page_table_lock = ht_lock, 58 59 .page_table_unlock = ht_unlock, 60 .page_table_locked = ht_locked, 59 61 }; 60 62 … … 126 128 } 127 129 130 /** Test whether page tables are locked. 131 * 132 * @param as Address space where the page tables belong. 133 * 134 * @return True if the page tables belonging to the address soace 135 * are locked, otherwise false. 136 */ 137 bool ht_locked(as_t *as) 138 { 139 return (mutex_locked(&page_ht_lock) && mutex_locked(&as->lock)); 140 } 141 128 142 /** @} 129 143 */ -
kernel/genarch/src/mm/as_pt.c
rc8e99bb rada559c 52 52 static void pt_lock(as_t *, bool); 53 53 static void pt_unlock(as_t *, bool); 54 static bool pt_locked(as_t *); 54 55 55 56 as_operations_t as_pt_operations = { … … 57 58 .page_table_destroy = ptl0_destroy, 58 59 .page_table_lock = pt_lock, 59 .page_table_unlock = pt_unlock 60 .page_table_unlock = pt_unlock, 61 .page_table_locked = pt_locked, 60 62 }; 61 63 … … 146 148 } 147 149 150 /** Test whether page tables are locked. 151 * 152 * @param as Address space where the page tables belong. 153 * 154 * @return True if the page tables belonging to the address soace 155 * are locked, otherwise false. 156 */ 157 bool pt_locked(as_t *as) 158 { 159 return mutex_locked(&as->lock); 160 } 161 148 162 /** @} 149 163 */ -
kernel/generic/include/mm/as.h
rc8e99bb rada559c 147 147 void (* page_table_lock)(as_t *, bool); 148 148 void (* page_table_unlock)(as_t *, bool); 149 bool (* page_table_locked)(as_t *); 149 150 } as_operations_t; 150 151 -
kernel/generic/include/mm/page.h
rc8e99bb rada559c 52 52 extern void page_table_lock(as_t *, bool); 53 53 extern void page_table_unlock(as_t *, bool); 54 extern bool page_table_locked(as_t *); 54 55 extern void page_mapping_insert(as_t *, uintptr_t, uintptr_t, unsigned int); 55 56 extern void page_mapping_remove(as_t *, uintptr_t); -
kernel/generic/src/mm/as.c
rc8e99bb rada559c 1293 1293 } 1294 1294 1295 /** Test whether page tables are locked. 1296 * 1297 * @param as Address space where the page tables belong. 1298 * 1299 * @return True if the page tables belonging to the address soace 1300 * are locked, otherwise false. 1301 */ 1302 bool page_table_locked(as_t *as) 1303 { 1304 ASSERT(as_operations); 1305 ASSERT(as_operations->page_table_locked); 1306 1307 return as_operations->page_table_locked(as); 1308 } 1309 1295 1310 1296 1311 /** Find address space area and lock it.
Note:
See TracChangeset
for help on using the changeset viewer.