xref: /qemu/linux-user/user-mmap.h (revision 892a4f6a750abceeda4c1ee8324f58f82fd6bd89)
15423e6d3SPeter Maydell /*
25423e6d3SPeter Maydell  * user-mmap.h: prototypes for linux-user guest binary loader
35423e6d3SPeter Maydell  *
45423e6d3SPeter Maydell  *  This program is free software; you can redistribute it and/or modify
55423e6d3SPeter Maydell  *  it under the terms of the GNU General Public License as published by
65423e6d3SPeter Maydell  *  the Free Software Foundation; either version 2 of the License, or
75423e6d3SPeter Maydell  *  (at your option) any later version.
85423e6d3SPeter Maydell  *
95423e6d3SPeter Maydell  *  This program is distributed in the hope that it will be useful,
105423e6d3SPeter Maydell  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
115423e6d3SPeter Maydell  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
125423e6d3SPeter Maydell  *  GNU General Public License for more details.
135423e6d3SPeter Maydell  *
145423e6d3SPeter Maydell  *  You should have received a copy of the GNU General Public License
155423e6d3SPeter Maydell  *  along with this program; if not, see <http://www.gnu.org/licenses/>.
165423e6d3SPeter Maydell  */
175423e6d3SPeter Maydell 
185423e6d3SPeter Maydell #ifndef LINUX_USER_USER_MMAP_H
195423e6d3SPeter Maydell #define LINUX_USER_USER_MMAP_H
205423e6d3SPeter Maydell 
215423e6d3SPeter Maydell int target_mprotect(abi_ulong start, abi_ulong len, int prot);
225423e6d3SPeter Maydell abi_long target_mmap(abi_ulong start, abi_ulong len, int prot,
235423e6d3SPeter Maydell                      int flags, int fd, abi_ulong offset);
245423e6d3SPeter Maydell int target_munmap(abi_ulong start, abi_ulong len);
255423e6d3SPeter Maydell abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
265423e6d3SPeter Maydell                        abi_ulong new_size, unsigned long flags,
275423e6d3SPeter Maydell                        abi_ulong new_addr);
28*892a4f6aSIlya Leoshkevich abi_long target_madvise(abi_ulong start, abi_ulong len_in, int advice);
295423e6d3SPeter Maydell extern unsigned long last_brk;
305423e6d3SPeter Maydell extern abi_ulong mmap_next_start;
315423e6d3SPeter Maydell abi_ulong mmap_find_vma(abi_ulong, abi_ulong, abi_ulong);
325423e6d3SPeter Maydell void mmap_fork_start(void);
335423e6d3SPeter Maydell void mmap_fork_end(int child);
345423e6d3SPeter Maydell 
355423e6d3SPeter Maydell #endif /* LINUX_USER_USER_MMAP_H */
36