OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [sysdeps/] [mmap.c] - Blame information for rev 1767

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 199 simons
#define __CHECK_RETURN_ADDR
2
#include <syscall.h>
3
#include <sys/types.h>
4
#include <sys/mman.h>
5
 
6
#define __NR__mmap      SYS_mmap
7
 
8
static inline
9
_syscall1(long,_mmap,unsigned long *,buffer);
10
 
11
__ptr_t mmap (__ptr_t, size_t, int, int, int, off_t );
12
 
13
__ptr_t
14
mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, off_t off)
15
{
16
        unsigned long buffer[6];
17
 
18
        buffer[0] = (unsigned long)addr;
19
        buffer[1] = (unsigned long)len;
20
        buffer[2] = (unsigned long)prot;
21
        buffer[3] = (unsigned long)flags;
22
        buffer[4] = (unsigned long)fd;
23
        buffer[5] = (unsigned long)off;
24
        return (__ptr_t) _mmap(buffer);
25
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.