Changeset 6fa476f7 in mainline
- 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
- Location:
- generic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/include/mm/as.h
rf3ac636 r6fa476f7 115 115 extern as_area_t *as_area_create(as_t *as, int flags, size_t size, __address base); 116 116 extern __address as_area_resize(as_t *as, __address address, size_t size, int flags); 117 int as_area_send(task_id_t id, __address base , size_t size, int flags);117 int as_area_send(task_id_t id, __address base); 118 118 extern void as_set_mapping(as_t *as, __address page, __address frame); 119 119 extern int as_page_fault(__address page); -
generic/include/mm/as_arg.h
rf3ac636 r6fa476f7 46 46 void *base; 47 47 48 /* 49 * The following members are filled only by acceptor. 50 */ 48 51 unsigned long size; /**< Size of memory being sent/accepted must match. */ 49 52 int flags; /**< Address space area flags of sender and acceptor must match. */ -
generic/include/syscall/syscall.h
rf3ac636 r6fa476f7 41 41 SYS_AS_AREA_CREATE, 42 42 SYS_AS_AREA_RESIZE, 43 SYS_AS_AREA_ SHARE_APPROVE,44 SYS_AS_AREA_S HARE_PERFORM,43 SYS_AS_AREA_ACCEPT, 44 SYS_AS_AREA_SEND, 45 45 SYS_IPC_CALL_SYNC_FAST, 46 46 SYS_IPC_CALL_SYNC, -
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.