Changes in kernel/generic/src/mm/as.c [78de83de:7c3fb9b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/mm/as.c
r78de83de r7c3fb9b 163 163 as->asid = ASID_INVALID; 164 164 165 refcount_init(&as->refcount);165 atomic_set(&as->refcount, 0); 166 166 as->cpu_refcount = 0; 167 167 … … 190 190 191 191 assert(as != AS); 192 assert( refcount_unique(&as->refcount));192 assert(atomic_get(&as->refcount) == 0); 193 193 194 194 /* … … 267 267 NO_TRACE void as_hold(as_t *as) 268 268 { 269 refcount_up(&as->refcount);269 atomic_inc(&as->refcount); 270 270 } 271 271 … … 275 275 * destroys the address space. 276 276 * 277 * @param as 277 * @param asAddress space to be released. 278 278 * 279 279 */ 280 280 NO_TRACE void as_release(as_t *as) 281 281 { 282 if ( refcount_down(&as->refcount))282 if (atomic_predec(&as->refcount) == 0) 283 283 as_destroy(as); 284 284 }
Note:
See TracChangeset
for help on using the changeset viewer.