git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2390 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2010-11-20 08:43:30 +00:00
parent 3ae01fd47b
commit 66c3169f4f
2 changed files with 18 additions and 9 deletions

View File

@ -122,9 +122,12 @@ Thread *chThdCreateFromHeap(MemoryHeap *heapp, size_t size,
return NULL;
#if CH_DBG_FILL_THREADS
memfill((uint8_t *)wsp, (uint8_t *)wsp + sizeof(Thread), THREAD_FILL_VALUE);
memfill((uint8_t *)wsp + sizeof(Thread),
(uint8_t *)wsp + size, STACK_FILL_VALUE);
_thread_memfill((uint8_t *)wsp,
(uint8_t *)wsp + sizeof(Thread),
THREAD_FILL_VALUE);
_thread_memfill((uint8_t *)wsp + sizeof(Thread),
(uint8_t *)wsp + size,
STACK_FILL_VALUE);
#endif
chSysLock();
@ -170,9 +173,12 @@ Thread *chThdCreateFromMemoryPool(MemoryPool *mp, tprio_t prio,
return NULL;
#if CH_DBG_FILL_THREADS
memfill((uint8_t *)wsp, (uint8_t *)wsp + sizeof(Thread), THREAD_FILL_VALUE);
memfill((uint8_t *)wsp + sizeof(Thread),
(uint8_t *)wsp + mp->mp_object_size, STACK_FILL_VALUE);
_thread_memfill((uint8_t *)wsp,
(uint8_t *)wsp + sizeof(Thread),
THREAD_FILL_VALUE);
_thread_memfill((uint8_t *)wsp + sizeof(Thread),
(uint8_t *)wsp + mp->mp_object_size,
STACK_FILL_VALUE);
#endif
chSysLock();

View File

@ -173,9 +173,12 @@ Thread *chThdCreateStatic(void *wsp, size_t size,
Thread *tp;
#if CH_DBG_FILL_THREADS
memfill((uint8_t *)wsp, (uint8_t *)wsp + sizeof(Thread), THREAD_FILL_VALUE);
memfill((uint8_t *)wsp + sizeof(Thread),
(uint8_t *)wsp + size, STACK_FILL_VALUE);
_thread_memfill((uint8_t *)wsp,
(uint8_t *)wsp + sizeof(Thread),
THREAD_FILL_VALUE);
_thread_memfill((uint8_t *)wsp + sizeof(Thread),
(uint8_t *)wsp + size,
STACK_FILL_VALUE);
#endif
chSysLock();
chSchWakeupS(tp = chThdCreateI(wsp, size, prio, pf, arg), RDY_OK);