- Timestamp:
- 2006-05-14T17:17:35Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 52352ec
- Parents:
- 8071af9f
- Location:
- libc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libc/generic/as.c
r8071af9f r8a568e3 70 70 } 71 71 72 /** Prepare to accept address space area.73 *74 * @param id Task ID of the donor task.75 * @param base Destination address for the new address space area.76 * @param size Size of the new address space area.77 * @param flags Flags of the area TASK is willing to accept.78 *79 * @return 0 on success or a code from errno.h.80 */81 int as_area_accept(task_id_t id, void *base, size_t size, int flags)82 {83 as_area_acptsnd_arg_t arg;84 85 arg.task_id = id;86 arg.base = base;87 arg.size = size;88 arg.flags = flags;89 90 return __SYSCALL1(SYS_AS_AREA_ACCEPT, (sysarg_t) &arg);91 }92 93 /** Send address space area to another task.94 *95 * @param id Task ID of the acceptor task.96 * @param base Source address of the existing address space area.97 *98 * @return 0 on success or a code from errno.h.99 */100 int as_area_send(task_id_t id, void *base)101 {102 as_area_acptsnd_arg_t arg;103 104 arg.task_id = id;105 arg.base = base;106 arg.size = 0;107 arg.flags = 0;108 109 return __SYSCALL1(SYS_AS_AREA_SEND, (sysarg_t) &arg);110 }111 112 72 static size_t heapsize = 0; 113 73 /* Start of heap linker symbol */ -
libc/include/as.h
r8071af9f r8a568e3 27 27 */ 28 28 29 #ifndef __ AS_H__30 #define __ AS_H__29 #ifndef __libc_AS_H__ 30 #define __libc_AS_H__ 31 31 32 32 #include <types.h> 33 33 #include <task.h> 34 #include <kernel/mm/as.h> 34 35 35 36 extern void *as_area_create(void *address, size_t size, int flags); 36 37 extern int as_area_resize(void *address, size_t size, int flags); 37 38 extern int as_area_destroy(void *address); 38 extern int as_area_accept(task_id_t id, void *base, size_t size, int flags);39 extern int as_area_send(task_id_t id, void *base);40 39 41 40 #endif
Note:
See TracChangeset
for help on using the changeset viewer.