diff options
author | Sergio Lopez <sergio.lopez@sinrega.org> | 2011-11-20 09:56:18 +0100 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2011-11-20 09:56:18 +0100 |
commit | b30813c7b942f1146def88ac52f8179947294e49 (patch) | |
tree | f4728e7d617d4ae5ae82a216f9766839dcdec33d /mach-defpager | |
parent | 0162d565bf9b48d8ee33406f2f1d65c05c37fe88 (diff) |
Just destroy port rights in default_pager
* mach-defpager/default_pager.c (seqnos_memory_object_terminate): Simply call
`mach_port_destroy' instead of managing rights through `mach_port_mod_refs'.
Diffstat (limited to 'mach-defpager')
-rw-r--r-- | mach-defpager/default_pager.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/mach-defpager/default_pager.c b/mach-defpager/default_pager.c index 82619b4b..07274553 100644 --- a/mach-defpager/default_pager.c +++ b/mach-defpager/default_pager.c @@ -2514,30 +2514,11 @@ ddprintf ("seqnos_memory_object_terminate <%p>: pager_port_unlock: <%p>[s:%d,r:% pager_port_unlock(ds); /* - * Now we deallocate our various port rights. + * Now we destroy our port rights. */ - kr = mach_port_get_refs(default_pager_self, pager_request, - MACH_PORT_RIGHT_SEND, &request_refs); - kr = mach_port_mod_refs(default_pager_self, pager_request, - MACH_PORT_RIGHT_SEND, -request_refs); - if (kr != KERN_SUCCESS) - panic(here,my_name); - - kr = mach_port_mod_refs(default_pager_self, pager_request, - MACH_PORT_RIGHT_RECEIVE, -1); - if (kr != KERN_SUCCESS) - panic(here,my_name); - - kr = mach_port_mod_refs(default_pager_self, pager_name, - MACH_PORT_RIGHT_SEND, -name_refs); - if (kr != KERN_SUCCESS) - panic(here,my_name); - - kr = mach_port_mod_refs(default_pager_self, pager_name, - MACH_PORT_RIGHT_RECEIVE, -1); - if (kr != KERN_SUCCESS) - panic(here,my_name); + mach_port_destroy(mach_task_self(), pager_request); + mach_port_destroy(mach_task_self(), pager_name); return (KERN_SUCCESS); } |