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

This commit is contained in:
gdisirio 2009-12-10 22:26:16 +00:00
parent 4bb9e7735d
commit d980d7e3e4
2 changed files with 5 additions and 6 deletions

View File

@ -80,7 +80,7 @@
* @note Requires @p CH_USE_COREMEM. * @note Requires @p CH_USE_COREMEM.
*/ */
#if !defined(CH_MEMCORE_SIZE) || defined(__DOXYGEN__) #if !defined(CH_MEMCORE_SIZE) || defined(__DOXYGEN__)
#define CH_MEMCORE_SIZE 0x40000 #define CH_MEMCORE_SIZE 0x20000
#endif #endif
/*===========================================================================*/ /*===========================================================================*/
@ -419,8 +419,6 @@
#define THREAD_EXT_FIELDS \ #define THREAD_EXT_FIELDS \
struct { \ struct { \
/* Add threads custom fields here.*/ \ /* Add threads custom fields here.*/ \
/* The thread termination \p EventSource.*/ \
EventSource p_exitesource; \
}; };
#endif #endif
@ -434,7 +432,6 @@ struct { \
#if !defined(THREAD_EXT_INIT) || defined(__DOXYGEN__) #if !defined(THREAD_EXT_INIT) || defined(__DOXYGEN__)
#define THREAD_EXT_INIT(tp) { \ #define THREAD_EXT_INIT(tp) { \
/* Add threads initialization code here.*/ \ /* Add threads initialization code here.*/ \
chEvtInit(&tp->p_exitesource); \
} }
#endif #endif
@ -449,7 +446,6 @@ struct { \
#if !defined(THREAD_EXT_EXIT) || defined(__DOXYGEN__) #if !defined(THREAD_EXT_EXIT) || defined(__DOXYGEN__)
#define THREAD_EXT_EXIT(tp) { \ #define THREAD_EXT_EXIT(tp) { \
/* Add threads finalization code here.*/ \ /* Add threads finalization code here.*/ \
chEvtBroadcastI(&currp->p_exitesource); \
} }
#endif #endif

View File

@ -42,8 +42,11 @@ void cmd_test(BaseChannel *chp, int argc, char *argv[]) {
} }
tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriority(), tp = chThdCreateFromHeap(NULL, TEST_WA_SIZE, chThdGetPriority(),
TestThread, chp); TestThread, chp);
if (tp == NULL) {
shellPrintLine(chp, "out of memory");
return;
}
chThdWait(tp); chThdWait(tp);
// TestThread(chp);
} }
static const ShellCommand commands[] = { static const ShellCommand commands[] = {