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