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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [uclinux/] [uC-libc/] [sysdeps/] [mmap.c] - Rev 1770

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

#define __CHECK_RETURN_ADDR
#include <syscall.h>
#include <sys/types.h>
#include <sys/mman.h>
 
#define __NR__mmap	SYS_mmap
 
static inline
_syscall1(long,_mmap,unsigned long *,buffer);
 
__ptr_t mmap (__ptr_t, size_t, int, int, int, off_t );
 
__ptr_t
mmap(__ptr_t addr, size_t len, int prot, int flags, int fd, off_t off)
{
	unsigned long buffer[6];
 
	buffer[0] = (unsigned long)addr;
	buffer[1] = (unsigned long)len;
	buffer[2] = (unsigned long)prot;
	buffer[3] = (unsigned long)flags;
	buffer[4] = (unsigned long)fd;
	buffer[5] = (unsigned long)off;
	return (__ptr_t) _mmap(buffer);
}
 

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

powered by: WebSVN 2.1.0

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