Subversion Repositories HelenOS-historic

Rev

Rev 1307 | Rev 1357 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1307 Rev 1330
Line 67... Line 67...
67
int as_area_destroy(void *address)
67
int as_area_destroy(void *address)
68
{
68
{
69
    return __SYSCALL1(SYS_AS_AREA_DESTROY, (sysarg_t ) address);
69
    return __SYSCALL1(SYS_AS_AREA_DESTROY, (sysarg_t ) address);
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
static size_t heapsize = 0;
72
static size_t heapsize = 0;
113
/* Start of heap linker symbol */
73
/* Start of heap linker symbol */
114
extern char _heap;
74
extern char _heap;
115
 
75
 
116
/** Sbrk emulation
76
/** Sbrk emulation