Subversion Repositories HelenOS-historic

Rev

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

Rev 999 Rev 1033
Line 27... Line 27...
27
 */
27
 */
28
 
28
 
29
#include <libc.h>
29
#include <libc.h>
30
#include <unistd.h>
30
#include <unistd.h>
31
 
31
 
32
/** Mremap syscall */
32
/** mmap syscall
-
 
33
 *
-
 
34
 * @param address Virtual address where to place new address space area.
-
 
35
 * @param size Size of the area.
-
 
36
 * @param flags Flags describing type of the area.
-
 
37
 *
-
 
38
 * @return address on success, (void *) -1 otherwise.
-
 
39
 */
33
void *mremap(void *address, size_t size, unsigned long flags)
40
void *mmap(void *address, size_t size, int flags)
34
{
41
{
35
    return (void *) __SYSCALL3(SYS_MREMAP, (sysarg_t ) address, (sysarg_t) size, (sysarg_t) flags);
42
    return (void *) __SYSCALL3(SYS_MMAP, (sysarg_t ) address, (sysarg_t) size, (sysarg_t) flags);
36
}
43
}
37
 
44
 
-
 
45
/** mremap syscall
-
 
46
 *
-
 
47
 * @param address Virtual address pointing into already existing address space area.
-
 
48
 * @param size New requested size of the area.
-
 
49
 * @param flags Currently unused.
-
 
50
 *
-
 
51
 * @return address on success, (void *) -1 otherwise.
-
 
52
 */
-
 
53
void *mremap(void *address, size_t size, int flags)
-
 
54
{
-
 
55
    return (void *) __SYSCALL3(SYS_MREMAP, (sysarg_t ) address, (sysarg_t) size, (sysarg_t) flags);
-
 
56
}
38
 
57
 
39
static size_t heapsize = 0;
58
static size_t heapsize = 0;
40
/* Start of heap linker symbol */
59
/* Start of heap linker symbol */
41
extern char _heap;
60
extern char _heap;
42
 
61