summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2009-12-22 14:36:14 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2009-12-22 14:36:14 +0100
commitab6c686d71a3cd13e0c798a7b38c7acc75609beb (patch)
treee6b9dc3f47d4d660a00d1ec8964a16b65934f291
parent55917f2ee5365d2f38173d1b156f180b41a00e44 (diff)
Do not systematically debug buggy port deallocation
* ipc/mach_port.c (debug_mach_port_deallocation): New variable, set to 0. (mach_port_deallocate): Only call SoftDebugger if debug_mach_port_deallocation is not 0.
-rw-r--r--ipc/mach_port.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ipc/mach_port.c b/ipc/mach_port.c
index 4315e80..14afd42 100644
--- a/ipc/mach_port.c
+++ b/ipc/mach_port.c
@@ -590,6 +590,7 @@ mach_port_destroy(
* KERN_INVALID_RIGHT The right isn't correct.
*/
+static int debug_mach_port_deallocate = 0;
kern_return_t
mach_port_deallocate(
ipc_space_t space,
@@ -605,7 +606,8 @@ mach_port_deallocate(
if (kr != KERN_SUCCESS) {
if (name != MACH_PORT_NULL && name != MACH_PORT_DEAD) {
printf("task %p deallocating an invalid port %u, most probably a bug.\n", current_task(), name);
- SoftDebugger("mach_port_deallocate");
+ if (debug_mach_port_deallocate)
+ SoftDebugger("mach_port_deallocate");
}
return kr;
}