Changeset da1bafb in mainline for kernel/genarch/src/mm/as_ht.c
- Timestamp:
- 2010-05-24T18:57:31Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0095368
- Parents:
- 666f492
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/genarch/src/mm/as_ht.c
r666f492 rda1bafb 30 30 * @{ 31 31 */ 32 32 33 33 /** 34 34 * @file 35 * @brief 35 * @brief Address space functions for global page hash table. 36 36 */ 37 37 … … 46 46 #include <synch/mutex.h> 47 47 48 static pte_t *ht_create( int flags);49 static void ht_destroy(pte_t * page_table);48 static pte_t *ht_create(unsigned int); 49 static void ht_destroy(pte_t *); 50 50 51 static void ht_lock(as_t * as, bool lock);52 static void ht_unlock(as_t * as, bool unlock);51 static void ht_lock(as_t *, bool); 52 static void ht_unlock(as_t *, bool); 53 53 54 54 as_operations_t as_ht_operations = { … … 68 68 * 69 69 * @return Returns NULL. 70 * 70 71 */ 71 pte_t *ht_create( int flags)72 pte_t *ht_create(unsigned int flags) 72 73 { 73 74 if (flags & FLAG_AS_KERNEL) { … … 75 76 mutex_initialize(&page_ht_lock, MUTEX_PASSIVE); 76 77 } 78 77 79 return NULL; 78 80 } … … 83 85 * 84 86 * @param page_table This parameter is ignored. 87 * 85 88 */ 86 89 void ht_destroy(pte_t *page_table) … … 94 97 * Interrupts must be disabled. 95 98 * 96 * @param as Address space.99 * @param as Address space. 97 100 * @param lock If false, do not attempt to lock the address space. 101 * 98 102 */ 99 103 void ht_lock(as_t *as, bool lock) … … 101 105 if (lock) 102 106 mutex_lock(&as->lock); 107 103 108 mutex_lock(&page_ht_lock); 104 109 } … … 109 114 * Interrupts must be disabled. 110 115 * 111 * @param as Address space.116 * @param as Address space. 112 117 * @param unlock If false, do not attempt to lock the address space. 118 * 113 119 */ 114 120 void ht_unlock(as_t *as, bool unlock) 115 121 { 116 122 mutex_unlock(&page_ht_lock); 123 117 124 if (unlock) 118 125 mutex_unlock(&as->lock);
Note:
See TracChangeset
for help on using the changeset viewer.