Subversion Repositories HelenOS

Rev

Rev 2131 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2131 Rev 2292
Line 34... Line 34...
34
 
34
 
35
#include <sys/mman.h>
35
#include <sys/mman.h>
36
#include <as.h>
36
#include <as.h>
37
#include <unistd.h>
37
#include <unistd.h>
38
 
38
 
39
void *mmap(void  *start, size_t length, int prot, int flags, int fd, off_t offset)
39
void *mmap(void  *start, size_t length, int prot, int flags, int fd,
-
 
40
    off_t offset)
40
{
41
{
41
    if (!start)
42
    if (!start)
42
        start = as_get_mappable_page(length, 0);
43
        start = as_get_mappable_page(length);
43
   
44
   
44
//  if (! ((flags & MAP_SHARED) ^ (flags & MAP_PRIVATE)))
45
//  if (! ((flags & MAP_SHARED) ^ (flags & MAP_PRIVATE)))
45
//      return MAP_FAILED;
46
//      return MAP_FAILED;
46
    if (! (flags & MAP_ANONYMOUS))
47
    if (! (flags & MAP_ANONYMOUS))
47
        return MAP_FAILED;
48
        return MAP_FAILED;