summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO11
-rw-r--r--defpager/Makefile10
-rw-r--r--defpager/defpager.c2
-rw-r--r--defpager/wiring.c111
4 files changed, 124 insertions, 10 deletions
diff --git a/TODO b/TODO
index 413c29f6..cf7f4897 100644
--- a/TODO
+++ b/TODO
@@ -47,6 +47,7 @@ See `tasks', the exported task list.
*** flink
*** make sure profiling works !!
*** implement revoke once io_revoke is added. !!
+*** add chflags flags to appropriate header(s)
** libports:
*** Get rid of general `uninibited-rpcs' mechanism in libports, & just
@@ -106,13 +107,11 @@ See `tasks', the exported task list.
*** Add `author_tracks_uid' flag to struct node, and use it in places
that modify author/uid. Initialized to 0. !!
*** Move file_getfh and fsys_getfile here (from ufs). !!!
-*** Use idvecs. !!!
+
** libfshelp
*** Put functions here to deal with directory and file change notifications !!!
*** Translator startup should provide a more useful stdin/stdout than nothing !
-*** Add functions to do permission checking and change libdiskfs et. al.
- to use them. !!!
** libtrivfs
*** Allow for read/write/exec to be passed down.
@@ -133,6 +132,7 @@ See `tasks', the exported task list.
** Login/utmp?
** fifos are flaky. ?? Details ??
** pflocal: make peer addresses work?
+** term: find a way to reduce duplicate signals from repeated VINTR input
** proc:
*** Add a version of proc_wait usable by non-parent processes, and use it in
@@ -159,6 +159,7 @@ See `tasks', the exported task list.
*** Implement nqnfs. !
*** Add Hurd-specific calls. !!
*** emacs M-x server doesn't work if ~ is on nfs. !!!
+*** errors in mount_root should get reflected more usefully to users. !
** storeio:
*** Make a server (/servers/storeio?) to share multiple storeio nodes
@@ -251,10 +252,6 @@ See `tasks', the exported task list.
execve fails]
???
-Find out why ^G in emacs, esp at prompts, often results in a long (~2s)
- pause; if you hit it several times, the abort-and-dump-core ^G catcher
- usually gets activated.
-
List for version 0.2 binary release
* Install patch from hag for disk device in mach
diff --git a/defpager/Makefile b/defpager/Makefile
index d774073e..8f92dd7c 100644
--- a/defpager/Makefile
+++ b/defpager/Makefile
@@ -1,5 +1,5 @@
#
-# Copyright (C) 1995 Free Software Foundation
+# Copyright (C) 1995, 1996 Free Software Foundation
# Written by Michael I. Bushnell.
#
# This file is part of the GNU Hurd.
@@ -23,4 +23,12 @@ makemode := misc
SRCS = defpager.c
+subst-functions=__syscall_vm_allocate syscall_vm_allocate \
+ __vm_allocate_rpc vm_allocate_rpc \
+ __syscall_vm_map syscall_vm_map \
+ __vm_map_rpc vm_map_rpc
+comma=,
+LDFLAGS=-Wl,$(subst :,$(comma),$(strip $(subst-functions)))
+
include ../Makeconf
+
diff --git a/defpager/defpager.c b/defpager/defpager.c
index 9b0bce3a..87ff6aba 100644
--- a/defpager/defpager.c
+++ b/defpager/defpager.c
@@ -31,7 +31,6 @@ struct user_pager_info
off_t *map;
};
-
/* Expand the P->map as necessary to handle an incoming request of the
page at ADDR. */
static inline void
@@ -53,7 +52,6 @@ expand_map (struct user_pager_info *p, vm_offset_t addr)
}
}
-
error_t
pager_read_page (struct user_pager_info *pager,
vm_offset_t page,
diff --git a/defpager/wiring.c b/defpager/wiring.c
new file mode 100644
index 00000000..dda5d9d5
--- /dev/null
+++ b/defpager/wiring.c
@@ -0,0 +1,111 @@
+/* Memory wiring functions for default pager
+ Copyright (C) 1996 Free Software Foundation, Inc.
+ Written by Thomas Bushnell, n/BSG.
+
+ This file is part of the GNU Hurd.
+
+ The GNU Hurd 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.
+
+ The GNU Hurd 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. */
+
+
+/* This file uses the "wrap" feature of GNU ld. See the GNU ld
+ documentation for more information on how this works.
+ The list of functions we wrap is specified in Makefile as
+ $(subst-functions). */
+
+
+error_t
+__wrap___syscall_vm_allocate (task_t target_task,
+ vm_address_t *address,
+ vm_size_t size,
+ boolean_t anywhere)
+{
+ error_t err;
+
+ err = __real___syscall_vm_allocate (target_task, address, size, anywhere);
+ if (!err && target_task == mach_task_self ())
+ wire_segment (*address, size);
+ return err;
+}
+
+error_t
+__wrap___vm_allocate_rpc (task_t target_task,
+ vm_address_t *address,
+ vm_size_t size,
+ boolean_t anywhere)
+{
+ error_t err;
+
+ err = __real___vm_allocate_rpc (target_task, address, size, anywhere);
+ if (!err && target_task == mach_task_self ())
+ wire_segment (*address, size);
+ return err;
+}
+
+error_t
+__wrap___syscall_vm_map (mach_port_t target_task,
+ vm_address_t *address,
+ vm_size_t size,
+ vm_address_t mask,
+ boolean_t anywhere,
+ mach_port_t memory_object,
+ vm_offset_t offset,
+ boolean_t copy,
+ vm_prot_t cur_protection,
+ vm_prot_t max_protection,
+ vm_inherit_t inheritance)
+{
+ error_t err;
+
+ err = __real___syscall_vm_map (target_task, address, size, mask, anywhere,
+ memory_object, offset, copy, cur_protection,
+ max_protection, inheritance);
+ if (!err && target_task == mach_task_self ())
+ wire_segment (*address, size);
+ return err;
+}
+
+
+error_t
+__wrap___vm_map_rpc (mach_port_t target_task,
+ vm_address_t *address,
+ vm_size_t size,
+ vm_address_t mask,
+ boolean_t anywhere,
+ mach_port_t memory_object,
+ vm_offset_t offset,
+ boolean_t copy,
+ vm_prot_t cur_protection,
+ vm_prot_t max_protection,
+ vm_inherit_t inheritance)
+{
+ error_t err;
+
+ err = __real___vm_map_rpc (target_task, address, size, mask, anywhere,
+ memory_object, offset, copy, cur_protection,
+ mak_protection, inheritance);
+ if (!err && target_task == mach_task_self ())
+ wire_segment (*address, size);
+ return err;
+}
+
+/* And the non-__ versions too. */
+
+#define weak_alias(name,aliasname) \
+ extern typeof (name) aliasname __attribute__ ((weak, alias (#name)));
+
+weak_alias (__wrap___vm_map_rpc, __wrap_vm_map_rpc)
+weak_alias (__wrap___syscall_vm_map, __wrap_syscall_vm_map)
+weak_alias (__wrap___vm_allocate_rpc, __wrap_vm_allocate_rpc)
+weak_alias (__wrap___syscall_vm_allocate, __wrap_syscall_vm_allocate)