From 66c3169f4f74a769bd7f7cf8b8a5cdc0342bdc17 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 20 Nov 2010 08:43:30 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@2390 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/kernel/src/chdynamic.c | 18 ++++++++++++------ os/kernel/src/chthreads.c | 9 ++++++--- 2 files changed, 18 insertions(+), 9 deletions(-) (limited to 'os/kernel/src') diff --git a/os/kernel/src/chdynamic.c b/os/kernel/src/chdynamic.c index fba8a0278..06e5bd00a 100644 --- a/os/kernel/src/chdynamic.c +++ b/os/kernel/src/chdynamic.c @@ -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(); diff --git a/os/kernel/src/chthreads.c b/os/kernel/src/chthreads.c index 65468a3b2..4e8ae1c21 100644 --- a/os/kernel/src/chthreads.c +++ b/os/kernel/src/chthreads.c @@ -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); -- cgit v1.2.3