summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-07-08 23:31:22 +0000
committerMiles Bader <miles@gnu.org>1995-07-08 23:31:22 +0000
commit3f4f905730a5caeb7a2938567940e45025fefb4b (patch)
tree41b27b75bf7443fca1675d59803dece76e73d058
parent42bc32baeeedd78ab41c0f21aeed696ef4fc8171 (diff)
(dev_get_memory_object): Moved function to devpager.c.
-rw-r--r--devio/dev.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/devio/dev.c b/devio/dev.c
index a2eed5c0..b120c07c 100644
--- a/devio/dev.c
+++ b/devio/dev.c
@@ -423,32 +423,3 @@ dev_read(struct dev *dev,
return err;
}
-
-/* ---------------------------------------------------------------- */
-
-/* Returns in MEMOBJ the port for a memory object backed by the storage on
- DEV. Returns 0 or the error code if an error occurred. */
-error_t
-dev_get_memory_object(struct dev *dev, memory_object_t *memobj)
-{
- if (dev_is(dev, DEV_SERIAL))
- return ENODEV;
-
- io_state_lock(&dev->io_state);
- if (dev->pager == NULL)
- dev->pager =
- pager_create((struct user_pager_info *)dev, 1, MEMORY_OBJECT_COPY_DELAY);
- io_state_unlock(&dev->io_state);
-
- if (dev->pager == NULL)
- return ENODEV; /* XXX ??? */
-
- *memobj = pager_get_port(dev->pager);
- if (*memobj != MACH_PORT_NULL)
- return
- mach_port_insert_right(mach_task_self(),
- *memobj, *memobj,
- MACH_MSG_TYPE_MAKE_SEND);
-
- return 0;
-}