summaryrefslogtreecommitdiff
path: root/libpager
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-01-13 19:43:14 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-01-13 19:43:14 +0000
commitb643948e1fddb54f5a8b580704237e4e09432a69 (patch)
treeb96c976f8ce9e114e6e3a2494322f22bba8f4659 /libpager
parent360761f040baee2424cb35fa936f2ce6d30f7eea (diff)
Initial revision
Diffstat (limited to 'libpager')
-rw-r--r--libpager/data-request.c17
-rw-r--r--libpager/priv.h70
2 files changed, 87 insertions, 0 deletions
diff --git a/libpager/data-request.c b/libpager/data-request.c
new file mode 100644
index 00000000..4280b4e2
--- /dev/null
+++ b/libpager/data-request.c
@@ -0,0 +1,17 @@
+/* Implementation of
+ Copyright (C) 1994 Free Software Foundation
+
+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
diff --git a/libpager/priv.h b/libpager/priv.h
new file mode 100644
index 00000000..ddeebc14
--- /dev/null
+++ b/libpager/priv.h
@@ -0,0 +1,70 @@
+/* Private data for pager library.
+ Copyright (C) 1994 Free Software Foundation
+
+ 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., 675 Mass Ave, Cambridge, MA 02139, USA. */
+
+struct pager
+{
+ struct port_info port;
+ struct user_pager_info *upi;
+
+ enum
+ {
+ NOTINIT, /* before memory_object_init */
+ NORMAL, /* while running */
+ SHUTDOWN, /* ignore all further requests */
+ } pager_state;
+
+ struct mutex interlock;
+ struct condition wakeup;
+
+ struct lock_request *lock_requests; /* pending lock requests */
+
+ /* Interface ports */
+ memory_object_control_t memobjcntl;
+ memory_object_name_t memobjname;
+
+ int mscount;
+
+ int seqno;
+
+ int noterm; /* number of threads blocking termination */
+
+ struct pager *next, **pprev;
+
+ int termwaiting:1;
+ int waitingforseqno:1;
+
+ char *pagemap;
+ int pagemapsize;
+};
+
+struct lock_request
+{
+ struct lock_request *next, **prevp;
+ vm_address_t start, end;
+ int pending_writes;
+ int locks_pending;
+ int threads_waiting;
+};
+
+enum page_errors
+{
+ PAGE_NOERR,
+ PAGE_ENOSPC,
+ PAGE_EIO,
+ PAGE_EDQUOT,
+};
+