Changeset 13964ef in mainline for kernel/generic/src/proc/thread.c


Ignore:
Timestamp:
2008-11-22T17:10:12Z (16 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0aa1665
Parents:
2eb893b
Message:

Fix race that allowed Udebug to report THREAD_B events for threads already reported with THREAD_READ.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/proc/thread.c

    r2eb893b r13964ef  
    764764                         }
    765765                }
     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
    766776                thread_attach(t, TASK);
     777#endif
    767778                thread_ready(t);
    768 
    769 #ifdef CONFIG_UDEBUG
    770                 /* Generate udebug THREAD_B event */
    771                 udebug_thread_b_event(t);
    772 #endif
    773779
    774780                return 0;
Note: See TracChangeset for help on using the changeset viewer.