Changeset 38dc82d in mainline for kernel/genarch/src/mm/page_ht.c
- Timestamp:
- 2016-08-31T14:16:45Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 346b12a2
- Parents:
- dc05a9a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/page_ht.c
rdc05a9a r38dc82d 59 59 static void ht_mapping_insert(as_t *, uintptr_t, uintptr_t, unsigned int); 60 60 static void ht_mapping_remove(as_t *, uintptr_t); 61 static pte_t *ht_mapping_find(as_t *, uintptr_t, bool);61 static bool ht_mapping_find(as_t *, uintptr_t, bool, pte_t *); 62 62 static void ht_mapping_make_global(uintptr_t, size_t); 63 63 … … 248 248 /** Find mapping for virtual page in page hash table. 249 249 * 250 * @param as Address space to which page belongs.251 * @param page Virtual page.252 * @param nolock True if the page tables need not be locked.253 * 254 * @return NULL if there is no such mapping; requested mapping otherwise.255 * 256 */ 257 pte_t *ht_mapping_find(as_t *as, uintptr_t page, bool nolock)250 * @param as Address space to which page belongs. 251 * @param page Virtual page. 252 * @param nolock True if the page tables need not be locked. 253 * @param[out] pte Structure that will receive a copy of the found PTE. 254 * 255 * @return True if the mapping was found, false otherwise. 256 */ 257 bool ht_mapping_find(as_t *as, uintptr_t page, bool nolock, pte_t *pte) 258 258 { 259 259 sysarg_t key[2] = { … … 266 266 link_t *cur = hash_table_find(&page_ht, key); 267 267 if (cur) 268 returnhash_table_get_instance(cur, pte_t, link);269 270 return NULL;268 *pte = *hash_table_get_instance(cur, pte_t, link); 269 270 return cur != NULL; 271 271 } 272 272
Note:
See TracChangeset
for help on using the changeset viewer.