; RTMK memory pager interface -*-Scheme-*- ; Copyright 1999, 2000, 2001, 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, 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 (dni "memory_pager" "rtmk memory pager interface" 4000) #if KERNEL_SERVER (import "mutations.h") #else (import "") #endif ; A pager is a backing storage for data. Memory objects are ; mapped against a pager which supplys the object with data. ; The pager may choose to provide data or not. ; Note that all memory pager functions are not full RPCs. ; 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. (define-routine memory-pager-init (c-name "memory_pager_init") (comment "establish new mapping of PAGER") () (return-type void) (arguments ((pager "pager" rtmk-port-t) (pager-req "pager_req" rtmk-port-t))) ) ; Request data from PAGER. ; Request region [OFFSET, 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. (define-routine memory-pager-data-request (c-name "memory_pager_data_request") (comment "request data from PAGER") () (return-type void) (arguments ((pager "pager" rtmk-port-t) (pager-req "pager_req" rtmk-port-t) (data-offset "offset" vm-offset-t) (size "size" vm-size-t) (desired-access "access" vm-prot-t))) ) (define-routine memory-pager-write-data (c-name "memory_pager_write_data") (comment "write data to PAGER") () (return-type void) (arguments ((pager "pager" rtmk-port-t) (pager-req "pager_req" rtmk-port-t) (data-offset "offset" vm-offset-t) (data "data" pointer-t) (dirty "dirty" int) (kernel-copy "kernel_copy" int))) ) ; ??? write ; ??? return ; ??? lockings ; ??? terminate