; 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. ; 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. (define-interface memory_object 4000 ; 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-method memory_object_init (returns) (arguments (out pager RTMK_MSG_TYPE_COPY_SEND) (out pager_req RTMK_MSG_TYPE_MAKE_SEND)) ) ; 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. (define-method memory_object_data_request (returns) (arguments (out pager RTMK_MSG_TYPE_COPY_SEND) (out pager_req RTMK_MSG_TYPE_MAKE_SEND) (out offset RTMK_MSG_TYPE_INTEGER32) (out size RTMK_MSG_TYPE_INTEGER32) (out access RTMK_MSG_TYPE_INTEGER32)) ) ; Write back data to PAGER. ??? extend comment (define-method memory_object_write_data (returns) (arguments (out pager RTMK_MSG_TYPE_COPY_SEND) (out pager_req RTMK_MSG_TYPE_MAKE_SEND) (out offset RTMK_MSG_TYPE_INTEGER32) (out data ^RTMK_MSG_TYPE_INTEGER8[]) (out dirty RTMK_MSG_TYPE_INTEGER32) (out cached RTMK_MSG_TYPE_INTEGER32)) ) )