Changeset 6fa476f7 in mainline for generic/src/mm/as.c
- Timestamp:
- 2006-04-26T17:03:15Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a9e8b39
- Parents:
- f3ac636
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/mm/as.c
rf3ac636 r6fa476f7 292 292 * @param id Task ID of the accepting task. 293 293 * @param base Base address of the source address space area. 294 * @param size Size of the source address space area.295 * @param flags Flags of the source address space area.296 294 * 297 295 * @return 0 on success or ENOENT if there is no such task or … … 301 299 * address space area. 302 300 */ 303 int as_area_send(task_id_t id, __address base , size_t size, int flags)301 int as_area_send(task_id_t id, __address base) 304 302 { 305 303 ipl_t ipl; … … 308 306 as_t *as; 309 307 __address dst_base; 308 int flags; 309 size_t size; 310 as_area_t *area; 310 311 311 312 ipl = interrupts_disable(); … … 334 335 return EPERM; 335 336 } 337 338 spinlock_lock(&AS->lock); 339 area = find_area_and_lock(AS, base); 340 if (!area) { 341 /* 342 * Could not find the source address space area. 343 */ 344 spinlock_unlock(&t->lock); 345 spinlock_unlock(&AS->lock); 346 interrupts_restore(ipl); 347 return ENOENT; 348 } 349 size = area->pages * PAGE_SIZE; 350 flags = area->flags; 351 spinlock_unlock(&area->lock); 352 spinlock_unlock(&AS->lock); 336 353 337 354 if ((t->accept_arg.task_id != TASK->taskid) || (t->accept_arg.size != size) || … … 880 897 } 881 898 882 return (__native) as_area_send(arg.task_id, (__address) arg.base , arg.size, arg.flags);883 } 899 return (__native) as_area_send(arg.task_id, (__address) arg.base); 900 }
Note:
See TracChangeset
for help on using the changeset viewer.