Changes in kernel/generic/src/udebug/udebug.c [0d21b53:a074b4f] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug.c
r0d21b53 ra074b4f 460 460 } 461 461 462 /** Wait for debugger to handle a fault in this thread.463 *464 * When a thread faults and someone is subscribed to the FAULT kernel event,465 * this function is called to wait for a debugging session to give userspace466 * a chance to examine the faulting thead/task. When the debugging session467 * is over, this function returns (so that thread/task cleanup can continue).468 */469 void udebug_thread_fault(void)470 {471 udebug_stoppable_begin();472 473 /* Wait until a debugger attends to us. */474 mutex_lock(&THREAD->udebug.lock);475 while (!THREAD->udebug.active)476 condvar_wait(&THREAD->udebug.active_cv, &THREAD->udebug.lock);477 mutex_unlock(&THREAD->udebug.lock);478 479 /* Make sure the debugging session is over before proceeding. */480 mutex_lock(&THREAD->udebug.lock);481 while (THREAD->udebug.active)482 condvar_wait(&THREAD->udebug.active_cv, &THREAD->udebug.lock);483 mutex_unlock(&THREAD->udebug.lock);484 485 udebug_stoppable_end();486 }487 462 488 463 /** @}
Note:
See TracChangeset
for help on using the changeset viewer.