X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/2d21ac55c334faf3a56e5634905ed6987fc787d4..ca66cea69e6e866fd781ae2260d9474bdd48f2ca:/bsd/uxkern/ux_exception.c diff --git a/bsd/uxkern/ux_exception.c b/bsd/uxkern/ux_exception.c index 6eb09940f..e63b6f3ba 100644 --- a/bsd/uxkern/ux_exception.c +++ b/bsd/uxkern/ux_exception.c @@ -126,7 +126,9 @@ ux_handler(void) (void *) &ux_exception_port) != MACH_MSG_SUCCESS) panic("ux_handler: object_copyin(ux_exception_port) failed"); + proc_list_lock(); thread_wakeup(&ux_exception_port); + proc_list_unlock(); /* Message handling loop. */ @@ -185,10 +187,11 @@ ux_handler_init(void) { ux_exception_port = MACH_PORT_NULL; (void) kernel_thread(kernel_task, ux_handler); + proc_list_lock(); if (ux_exception_port == MACH_PORT_NULL) { - assert_wait(&ux_exception_port, THREAD_UNINT); - thread_block(THREAD_CONTINUE_NULL); + (void)msleep(&ux_exception_port, proc_list_mlock, 0, "ux_handler_wait", 0); } + proc_list_unlock(); } kern_return_t