/* Copyright 1999-2002 Johan Rydberg, jrydberg@rtmk.org. 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 2 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, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "io-vfs.h" struct pager { rtmk_port_t pager_port; struct vnode *vnode; int precious_p; vm_prot_t lock_prot; }; /* Create a new pager that uses VNODE as backing storage. PROT is protection allowed. If PRECIOUS_P is true, data will be flushed back to VN. */ struct pager *pager_create (struct vnode *vn, vm_prot_t prot, int precious_p); /* Return receive right for pager. This is the right that we receive paging requests on. */ rtmk_port_t pager_get_right (struct pager *pager); /* Look up pager that is associated with PAGER_PORT. */ struct pager *pager_lookup (rtmk_port_t pager_port); void pager_memory_object_init (rtmk_port_t pager, rtmk_port_t pager_request); void pager_memory_object_data_request (rtmk_port_t pager, rtmk_port_t pager_request, vm_offset_t offset, vm_size_t size, vm_prot_t access); void pager_memory_object_write_data (rtmk_port_t pager, rtmk_port_t pager_request, vm_offset_t offset, void *address, vm_size_t size, int dirty_p, int kernel_copy_p);