Changeset 13964ef in mainline
- Timestamp:
- 2008-11-22T17:10:12Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0aa1665
- Parents:
- 2eb893b
- Location:
- kernel/generic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/udebug/udebug.h
r2eb893b r13964ef 195 195 bool end_variant); 196 196 197 void udebug_thread_b_event (struct thread *t);197 void udebug_thread_b_event_attach(struct thread *t, struct task *ta); 198 198 void udebug_thread_e_event(void); 199 199 -
kernel/generic/src/proc/thread.c
r2eb893b r13964ef 764 764 } 765 765 } 766 #ifdef CONFIG_UDEBUG 767 /* 768 * Generate udebug THREAD_B event and attach the thread. 769 * This must be done atomically (with the debug locks held), 770 * otherwise we would either miss some thread or receive 771 * THREAD_B events for threads that already existed 772 * and could be detected with THREAD_READ before. 773 */ 774 udebug_thread_b_event_attach(t, TASK); 775 #else 766 776 thread_attach(t, TASK); 777 #endif 767 778 thread_ready(t); 768 769 #ifdef CONFIG_UDEBUG770 /* Generate udebug THREAD_B event */771 udebug_thread_b_event(t);772 #endif773 779 774 780 return 0; -
kernel/generic/src/udebug/udebug.c
r2eb893b r13964ef 306 306 } 307 307 308 /** Thread-creation event hook .308 /** Thread-creation event hook combined with attaching the thread. 309 309 * 310 310 * Must be called when a new userspace thread is created in the debugged 311 * task. Generates a THREAD_B event. 311 * task. Generates a THREAD_B event. Also attaches the thread @a t 312 * to the task @a ta. 313 * 314 * This is necessary to avoid a race condition where the BEGIN and THREAD_READ 315 * requests would be handled inbetween attaching the thread and checking it 316 * for being in a debugging session to send the THREAD_B event. We could then 317 * either miss threads or get some threads both in the thread list 318 * and get a THREAD_B event for them. 312 319 * 313 320 * @param t Structure of the thread being created. Not locked, as the 314 321 * thread is not executing yet. 315 */ 316 void udebug_thread_b_event(struct thread *t) 322 * @param ta Task to which the thread should be attached. 323 */ 324 void udebug_thread_b_event_attach(struct thread *t, struct task *ta) 317 325 { 318 326 call_t *call; … … 320 328 mutex_lock(&TASK->udebug.lock); 321 329 mutex_lock(&THREAD->udebug.lock); 330 331 thread_attach(t, ta); 322 332 323 333 LOG("udebug_thread_b_event\n");
Note:
See TracChangeset
for help on using the changeset viewer.