From d980d7e3e434af2cd17ee2b04deaab65164204ce Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 10 Dec 2009 22:26:16 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1413 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/Win32-MinGW/chconf.h | 6 +----- demos/Win32-MinGW/main.c | 5 ++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/demos/Win32-MinGW/chconf.h b/demos/Win32-MinGW/chconf.h index 34575541a..2c3a29a30 100644 --- a/demos/Win32-MinGW/chconf.h +++ b/demos/Win32-MinGW/chconf.h @@ -80,7 +80,7 @@ * @note Requires @p CH_USE_COREMEM. */ #if !defined(CH_MEMCORE_SIZE) || defined(__DOXYGEN__) -#define CH_MEMCORE_SIZE 0x40000 +#define CH_MEMCORE_SIZE 0x20000 #endif /*===========================================================================*/ @@ -419,8 +419,6 @@ #define THREAD_EXT_FIELDS \ struct { \ /* Add threads custom fields here.*/ \ - /* The thread termination \p EventSource.*/ \ - EventSource p_exitesource; \ }; #endif @@ -434,7 +432,6 @@ struct { \ #if !defined(THREAD_EXT_INIT) || defined(__DOXYGEN__) #define THREAD_EXT_INIT(tp) { \ /* Add threads initialization code here.*/ \ - chEvtInit(&tp->p_exitesource); \ } #endif @@ -449,7 +446,6 @@ struct { \ #if !defined(THREAD_EXT_EXIT) || defined(__DOXYGEN__) #define THREAD_EXT_EXIT(tp) { \ /* Add threads finalization code here.*/ \ - chEvtBroadcastI(&currp->p_exitesource); \ } #endif diff --git a/demos/Win32-MinGW/main.c b/demos/Win32-MinGW/main.c index 22ea086c3..140f3bd79 100644 --- a/demos/Win32-MinGW/main.c +++ b/demos/Win32-MinGW/main.c @@ -42,8 +42,11 @@ void cmd_test(BaseChannel *chp, int argc, char *argv[]) { } tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriority(), TestThread, chp); + if (tp == NULL) { + shellPrintLine(chp, "out of memory"); + return; + } chThdWait(tp); -// TestThread(chp); } static const ShellCommand commands[] = { -- cgit v1.2.3