diff options
author | Miles Bader <miles@gnu.org> | 1995-07-08 23:31:22 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-07-08 23:31:22 +0000 |
commit | 3fd7df07acb0071685fa1f588ed613f278fb30c6 (patch) | |
tree | 58cb15f40247575d4c6b17da3894679ac4acb09e /devio | |
parent | 78cded2d21ccf8c6ceb4094610a272f2a1384695 (diff) |
(dev_get_memory_object): Moved function to devpager.c.
Diffstat (limited to 'devio')
-rw-r--r-- | devio/dev.c | 29 |
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; -} |