View of xos/mm/maps.h


XOS | Parent Directory | View | Download

/* Copyright (C) 2008  Emmanuel Varoquaux
 
   This file is part of XOS.
 
   This program is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation, either version 3 of the License, or
   (at your option) any later version.
 
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
 
   You should have received a copy of the GNU General Public License
   along with this program.  If not, see <http://www.gnu.org/licenses/>. */
 
#ifndef MAPS_H
#define MAPS_H
 
struct maps_struct;
struct map_struct;
struct map_info_struct;
 
void init_maps(struct maps_struct *maps);
int insert_map(struct maps_struct *maps, struct map_struct *map);
int clear_maps(struct maps_struct *maps, unsigned long start, unsigned long length);
int clone_maps(const struct maps_struct *maps, struct maps_struct *dest_maps, unsigned long start, unsigned long length);
int protect_maps(struct maps_struct *maps, unsigned long start, unsigned long length, int prot);
struct map_struct *find_map(const struct maps_struct *maps, unsigned long laddr);
struct map_struct *find_next_map(const struct maps_struct *maps, unsigned long laddr);
unsigned long get_free_area(const struct maps_struct *maps, unsigned long base, unsigned long size, unsigned long length, int side);
int get_maps(const struct maps_struct *maps, struct map_info_struct **map_info_array, unsigned int *count);
 
#endif