Changeset 13964ef in mainline for kernel/generic/src/udebug/udebug.c
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.