diff options
author | Thomas Bushnell <thomas@gnu.org> | 1997-08-20 19:06:04 +0000 |
---|---|---|
committer | Thomas Bushnell <thomas@gnu.org> | 1997-08-20 19:06:04 +0000 |
commit | 56c05885be4c655fc18c119dbb87527bf5b9af86 (patch) | |
tree | f1711b9b3cf03525f4b7a03da9d7ff3c6fb7fc7b /storeio | |
parent | 9cc6c9ec990fd9f2ffceeefd076c7236d7e3a1af (diff) |
Wed Aug 20 14:07:05 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu>
* pager.c (dev_get_memory_object): Deal with errors from
pager_create properly.
Diffstat (limited to 'storeio')
-rw-r--r-- | storeio/ChangeLog | 3 | ||||
-rw-r--r-- | storeio/pager.c | 32 |
2 files changed, 19 insertions, 16 deletions
diff --git a/storeio/ChangeLog b/storeio/ChangeLog index a56752ca..47311e4f 100644 --- a/storeio/ChangeLog +++ b/storeio/ChangeLog @@ -1,5 +1,8 @@ Wed Aug 20 14:07:05 1997 Thomas Bushnell, n/BSG <thomas@gnu.ai.mit.edu> + * pager.c (dev_get_memory_object): Deal with errors from + pager_create properly. + * pager.c (service_paging_requests): New args for ports_manage_port_operations_multithread. * storeio.c (main): Likewise. diff --git a/storeio/pager.c b/storeio/pager.c index e586fd68..28b5a4e0 100644 --- a/storeio/pager.c +++ b/storeio/pager.c @@ -230,27 +230,27 @@ dev_get_memory_object (struct dev *dev, vm_prot_t prot, memory_object_t *memobj) dev->pager = pager_create ((struct user_pager_info *)dev, pager_port_bucket, 1, MEMORY_OBJECT_COPY_DELAY); + if (dev->pager == NULL) + { + mutex_unlock (&dev->pager_lock); + return errno; + } created = 1; } - if (dev->pager == NULL) - err = ENODEV; /* XXX ??? */ - else - { - *memobj = pager_get_port (dev->pager); + *memobj = pager_get_port (dev->pager); - if (*memobj == MACH_PORT_NULL) - /* Pager is currently being destroyed, try again. */ - { - dev->pager = 0; - mutex_unlock (&dev->pager_lock); - return dev_get_memory_object (dev, prot, memobj); - } - else - err = - mach_port_insert_right (mach_task_self (), - *memobj, *memobj, MACH_MSG_TYPE_MAKE_SEND); + if (*memobj == MACH_PORT_NULL) + /* Pager is currently being destroyed, try again. */ + { + dev->pager = 0; + mutex_unlock (&dev->pager_lock); + return dev_get_memory_object (dev, prot, memobj); } + else + err = + mach_port_insert_right (mach_task_self (), + *memobj, *memobj, MACH_MSG_TYPE_MAKE_SEND); if (created) ports_port_deref (dev->pager); |