Changeset 3ff2b54 in mainline
- Timestamp:
- 2008-11-22T11:26:53Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 7e6c9eb
- Parents:
- 6571b78
- Location:
- kernel/generic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/udebug/udebug.h
r6571b78 r3ff2b54 176 176 call_t *go_call; 177 177 unative_t syscall_args[6]; 178 istate_t *uspace_state; 178 179 179 180 /** What type of event are we stopped in or 0 if none. */ -
kernel/generic/src/interrupt/interrupt.c
r6571b78 r3ff2b54 87 87 { 88 88 ASSERT(n < IVT_ITEMS); 89 90 #ifdef CONFIG_UDEBUG 91 if (THREAD) THREAD->udebug.uspace_state = istate; 92 #endif 89 93 90 94 exc_table[n].f(n + IVT_FIRST, istate); 95 96 #ifdef CONFIG_UDEBUG 97 if (THREAD) THREAD->udebug.uspace_state = NULL; 98 #endif 99 91 100 /* This is a safe place to exit exiting thread */ 92 101 if (THREAD && THREAD->interrupted && istate_from_uspace(istate)) -
kernel/generic/src/time/clock.c
r6571b78 r3ff2b54 191 191 if (!ticks && !PREEMPTION_DISABLED) { 192 192 scheduler(); 193 #ifdef CONFIG_UDEBUG 194 /* 195 * Give udebug chance to stop the thread 196 * before it begins executing. 197 */ 198 if (istate_from_uspace(THREAD->udebug.uspace_state)) 199 udebug_before_thread_runs(); 200 #endif 193 201 } 194 202 } -
kernel/generic/src/udebug/udebug.c
r6571b78 r3ff2b54 70 70 71 71 ut->go_call = NULL; 72 ut->uspace_state = NULL; 72 73 ut->go = false; 73 74 ut->stoppable = true; … … 232 233 /** Upon being scheduled to run, check if the current thread should stop. 233 234 * 234 * This function is called from clock(). Preemption is enabled. 235 * interrupts are disabled, but since this is called after 236 * being scheduled-in, we can enable them, if we're careful enough 237 * not to allow arbitrary recursion or deadlock with the thread context. 235 * This function is called from clock(). 238 236 */ 239 237 void udebug_before_thread_runs(void) 240 238 { 241 ipl_t ipl;242 243 return;244 245 ipl = interrupts_enable();246 247 /* Now we're free to do whatever we need (lock mutexes, sleep, etc.) */248 249 239 /* Check if we're supposed to stop */ 250 240 udebug_stoppable_begin(); 251 241 udebug_stoppable_end(); 252 253 interrupts_restore(ipl);254 242 } 255 243
Note:
See TracChangeset
for help on using the changeset viewer.