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

Subversion Repositories c0or1k

[/] [c0or1k/] [trunk/] [conts/] [posix/] [mm0/] [include/] [mmap.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 drasko
/*
2
 * Prototypes for mmap/munmap functions that do the actual work.
3
 *
4
 * Copyright (C) 2007 Bahadir Balban
5
 */
6
#ifndef __MM0_MMAP_H__
7
#define __MM0_MMAP_H__
8
 
9
#include <task.h>
10
#include <vm_area.h>
11
 
12
/* POSIX-defined mmap flags */
13
#define PROT_READ       0x1
14
#define PROT_WRITE      0x2
15
#define PROT_EXEC       0x4
16
#define PROT_NONE       0x0
17
 
18
#define MAP_ANONYMOUS   0x20
19
#define MAP_FIXED       0x10
20
#define MAP_SHARED      0x01
21
#define MAP_PRIVATE     0x02
22
#define MAP_GROWSDOWN   0x00100
23
 
24
struct vm_area *vma_new(unsigned long pfn_start, unsigned long npages,
25
                        unsigned int flags, unsigned long file_offset);
26
 
27
int do_munmap(struct tcb *task, unsigned long vaddr, unsigned long size);
28
 
29
void *do_mmap(struct vm_file *mapfile, unsigned long f_offset, struct tcb *t,
30
              unsigned long map_address, unsigned int flags, unsigned int pages);
31
 
32
int mmap_address_validate(struct tcb *t, unsigned long map_address,
33
                          unsigned int vm_flags);
34
 
35
#endif /* __MM0_MMAP_H__ */

powered by: WebSVN 2.1.0

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