Changeset af863d0 in mainline for kernel/generic/src/mm/as.c
- Timestamp:
- 2008-07-31T10:42:38Z (17 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6e0e8c9
- Parents:
- 2a513972
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/as.c
r2a513972 raf863d0 83 83 #endif /* CONFIG_VIRT_IDX_DCACHE */ 84 84 85 #ifndef __OBJC__86 85 /** 87 86 * Each architecture decides what functions will be used to carry out … … 94 93 */ 95 94 static slab_cache_t *as_slab; 96 #endif97 95 98 96 /** … … 120 118 static void sh_info_remove_reference(share_info_t *sh_info); 121 119 122 #ifndef __OBJC__123 120 static int as_constructor(void *obj, int flags) 124 121 { … … 140 137 return as_destructor_arch(as); 141 138 } 142 #endif143 139 144 140 /** Initialize address space subsystem. */ … … 147 143 as_arch_init(); 148 144 149 #ifndef __OBJC__150 145 as_slab = slab_cache_create("as_slab", sizeof(as_t), 0, 151 146 as_constructor, as_destructor, SLAB_CACHE_MAGDEFERRED); 152 #endif153 147 154 148 AS_KERNEL = as_create(FLAG_AS_KERNEL); … … 166 160 as_t *as; 167 161 168 #ifdef __OBJC__169 as = [as_t new];170 link_initialize(&as->inactive_as_with_asid_link);171 mutex_initialize(&as->lock, MUTEX_PASSIVE);172 (void) as_constructor_arch(as, flags);173 #else174 162 as = (as_t *) slab_alloc(as_slab, 0); 175 #endif176 163 (void) as_create_arch(as, 0); 177 164 … … 264 251 interrupts_restore(ipl); 265 252 266 #ifdef __OBJC__267 [as free];268 #else269 253 slab_free(as_slab, as); 270 #endif271 254 } 272 255 … … 1164 1147 pte_t *page_table_create(int flags) 1165 1148 { 1166 #ifdef __OBJC__1167 return [as_t page_table_create: flags];1168 #else1169 1149 ASSERT(as_operations); 1170 1150 ASSERT(as_operations->page_table_create); 1171 1151 1172 1152 return as_operations->page_table_create(flags); 1173 #endif1174 1153 } 1175 1154 … … 1182 1161 void page_table_destroy(pte_t *page_table) 1183 1162 { 1184 #ifdef __OBJC__1185 return [as_t page_table_destroy: page_table];1186 #else1187 1163 ASSERT(as_operations); 1188 1164 ASSERT(as_operations->page_table_destroy); 1189 1165 1190 1166 as_operations->page_table_destroy(page_table); 1191 #endif1192 1167 } 1193 1168 … … 1206 1181 void page_table_lock(as_t *as, bool lock) 1207 1182 { 1208 #ifdef __OBJC__1209 [as page_table_lock: lock];1210 #else1211 1183 ASSERT(as_operations); 1212 1184 ASSERT(as_operations->page_table_lock); 1213 1185 1214 1186 as_operations->page_table_lock(as, lock); 1215 #endif1216 1187 } 1217 1188 … … 1223 1194 void page_table_unlock(as_t *as, bool unlock) 1224 1195 { 1225 #ifdef __OBJC__1226 [as page_table_unlock: unlock];1227 #else1228 1196 ASSERT(as_operations); 1229 1197 ASSERT(as_operations->page_table_unlock); 1230 1198 1231 1199 as_operations->page_table_unlock(as, unlock); 1232 #endif1233 1200 } 1234 1201
Note:
See TracChangeset
for help on using the changeset viewer.