2 * (c) 2008-2009 Adam Lackorzynski <adam@os.inf.tu-dresden.de>,
3 * Alexander Warg <warg@os.inf.tu-dresden.de>
4 * economic rights: Technische Universität Dresden (Germany)
6 * This file is part of TUD:OS and distributed under the terms of the
7 * GNU General Public License 2.
8 * Please see the COPYING-GPL-2 file for details.
10 #define _GNU_SOURCE 1 // needed for mremap
14 #include "page_alloc.h"
16 #include <l4/cxx/iostream>
18 void * mmap(void * /*start*/, size_t length, int /*prot*/,
19 int flags, int /*fd*/, off_t offset) throw()
29 if (! (flags & MAP_ANON))
31 L4::cerr << "mmap() called without MAP_ANON flag, not supported!\n";
36 length = (length + (L4_PAGESIZE -1)) & ~(L4_PAGESIZE-1);
37 if (length != L4_PAGESIZE)
43 addr = Single_page_alloc<char>().alloc();
54 int munmap(void * /*start*/, size_t /*length*/) throw()
56 L4::cout << "munmap() called: unimplemented!\n";
61 void * mremap(void * /*old_address*/, size_t /*old_size*/, size_t /*new_size*/,
62 int /*may_move*/, ...) throw()
64 L4::cout << "mremap() called: unimplemented!\n";