/* Presentation of the kernel memory object interface. -*-C-*- 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. */ /* We import this to get the rtmk_msg_trap prototype. */ import "ipc-port.h"; import "ipc-syscall.h"; presentation memory_object implements memory_object { /* Sent to PAGER when it is used as backing storage for a new object. PAGER_REQ should be used to communicate with the object. This message is not a full RPC. */ int memory_object_init (struct ipc_port *pager, struct ipc_port *pager_req); /* Request data from PAGER. Request region [OFFSET, OBJECT+OFFSET) from backing storage PAGER. PAGER-REQ is the object that needs data, and the pager should supply data to it by replying with memory_object_data_supply or denying it data by reply with memory_object_data_unavail. */ int memory_object_data_request (struct ipc_port *pager, struct ipc_port *pager_req, vm_offset_t offset, vm_size_t size, vm_prot_t access); /* Write back data to PAGER. ??? extend comment */ int memory_object_write_data (struct ipc_port *pager, struct ipc_port *pager_req, vm_offset_t offset, void *data, vm_size_t size (length-of data), int dirty, int cached); };