Fixed bug 3069854.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/stable_2.0.x@2191 35acf78f-673a-0410-8e92-d51de3d6d3f4
This commit is contained in:
parent
46e4a207af
commit
d6cc0c5ccd
|
@ -73,14 +73,15 @@
|
|||
*/
|
||||
Thread *init_thread(Thread *tp, tprio_t prio) {
|
||||
|
||||
tp->p_flags = THD_MEM_MODE_STATIC;
|
||||
tp->p_prio = prio;
|
||||
tp->p_state = THD_STATE_SUSPENDED;
|
||||
#if CH_USE_REGISTRY
|
||||
REG_INSERT(tp);
|
||||
tp->p_flags = THD_MEM_MODE_STATIC;
|
||||
#if CH_USE_MUTEXES
|
||||
tp->p_realprio = prio;
|
||||
tp->p_mtxlist = NULL;
|
||||
#endif
|
||||
#if CH_USE_DYNAMIC
|
||||
tp->p_refs = 1;
|
||||
#if CH_USE_EVENTS
|
||||
tp->p_epending = 0;
|
||||
#endif
|
||||
#if CH_USE_NESTED_LOCKS
|
||||
tp->p_locks = 0;
|
||||
|
@ -88,9 +89,8 @@ Thread *init_thread(Thread *tp, tprio_t prio) {
|
|||
#if CH_DBG_THREADS_PROFILING
|
||||
tp->p_time = 0;
|
||||
#endif
|
||||
#if CH_USE_MUTEXES
|
||||
tp->p_realprio = prio;
|
||||
tp->p_mtxlist = NULL;
|
||||
#if CH_USE_DYNAMIC
|
||||
tp->p_refs = 1;
|
||||
#endif
|
||||
#if CH_USE_WAITEXIT
|
||||
list_init(&tp->p_waiting);
|
||||
|
@ -98,10 +98,14 @@ Thread *init_thread(Thread *tp, tprio_t prio) {
|
|||
#if CH_USE_MESSAGES
|
||||
queue_init(&tp->p_msgqueue);
|
||||
#endif
|
||||
#if CH_USE_EVENTS
|
||||
tp->p_epending = 0;
|
||||
#if CH_USE_REGISTRY
|
||||
chSysLock();
|
||||
REG_INSERT(tp);
|
||||
chSysUnlock();
|
||||
#endif
|
||||
#if defined(THREAD_EXT_EXIT_HOOK)
|
||||
THREAD_EXT_INIT_HOOK(tp);
|
||||
#endif
|
||||
THREAD_EXT_INIT(tp);
|
||||
return tp;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
*****************************************************************************
|
||||
|
||||
*** 2.0.5 ***
|
||||
- FIX: Fixed race condition in threads creation (bug 3069854).
|
||||
- FIX: Fixed broken CH_DBG_ENABLE_STACK_CHECK option in legacy CM3 port (bug
|
||||
3064274).
|
||||
- FIX: Fixed CAN_USE_SLEEP_MODE setting (bug 3064204).
|
||||
|
|
Loading…
Reference in New Issue