summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>1999-07-11 05:32:24 +0000
committerThomas Bushnell <thomas@gnu.org>1999-07-11 05:32:24 +0000
commit405d07e1e45eb3aec2aec7149f4b9f9fa70d9843 (patch)
tree14b1854f4637c44b44e7e0aa3a2e8e641f334af4
parentcd19ba270757a36b05b776253391debcef50d65c (diff)
1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
* ptyio.c (pty_io_read): Use mmap instead of vm_allocate. * users.c (trivfs_S_io_read): Likewise.
-rw-r--r--term/ChangeLog5
-rw-r--r--term/ptyio.c4
-rw-r--r--term/users.c2
3 files changed, 8 insertions, 3 deletions
diff --git a/term/ChangeLog b/term/ChangeLog
index dbf39514..e82c88f9 100644
--- a/term/ChangeLog
+++ b/term/ChangeLog
@@ -1,3 +1,8 @@
+1999-07-09 Thomas Bushnell, BSG <tb@mit.edu>
+
+ * ptyio.c (pty_io_read): Use mmap instead of vm_allocate.
+ * users.c (trivfs_S_io_read): Likewise.
+
1999-05-24 Mark Kettenis <kettenis@gnu.org>
* devio.c: Include <assert.h>, <errno.h> and <error.h>. Do
diff --git a/term/ptyio.c b/term/ptyio.c
index 7296eafd..94aec468 100644
--- a/term/ptyio.c
+++ b/term/ptyio.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1995, 1996 Free Software Foundation, Inc.
+ Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc.
Written by Michael I. Bushnell, p/BSG.
This file is part of the GNU Hurd.
@@ -333,7 +333,7 @@ pty_io_read (struct trivfs_protid *cred,
if (size > amount)
size = amount;
if (size > *datalen)
- vm_allocate (mach_task_self (), (vm_address_t *) data, size, 1);
+ *data = mmap (0, size, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
*datalen = size;
if (control_byte)
diff --git a/term/users.c b/term/users.c
index 67730052..60b7825f 100644
--- a/term/users.c
+++ b/term/users.c
@@ -696,7 +696,7 @@ trivfs_S_io_read (struct trivfs_protid *cred,
max = (amount < avail) ? amount : avail;
if (max > *datalen)
- vm_allocate (mach_task_self (), (vm_address_t *)data, max, 1);
+ *data = mmap (0, max, PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
cancel = 0;
cp = *data;