aboutsummaryrefslogtreecommitdiffstats
path: root/test/testdyn.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/testdyn.c')
-rw-r--r--test/testdyn.c27
1 files changed, 15 insertions, 12 deletions
diff --git a/test/testdyn.c b/test/testdyn.c
index 2035224a1..d015e2ac6 100644
--- a/test/testdyn.c
+++ b/test/testdyn.c
@@ -1,5 +1,6 @@
/*
- ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010 Giovanni Di Sirio.
+ ChibiOS/RT - Copyright (C) 2006,2007,2008,2009,2010,
+ 2011 Giovanni Di Sirio.
This file is part of ChibiOS/RT.
@@ -52,11 +53,11 @@
* @brief Dynamic thread APIs test header file
*/
-#if CH_USE_DYNAMIC
-#if CH_USE_HEAP
+#if CH_USE_DYNAMIC || defined(__DOXYGEN__)
+#if (CH_USE_HEAP && !CH_USE_MALLOC_HEAP) || defined(__DOXYGEN__)
static MemoryHeap heap1;
#endif
-#if CH_USE_MEMPOOLS
+#if CH_USE_MEMPOOLS || defined(__DOXYGEN__)
static MemoryPool mp1;
#endif
@@ -77,7 +78,7 @@ static msg_t thread(void *p) {
return 0;
}
-#if CH_USE_HEAP
+#if (CH_USE_HEAP && !CH_USE_MALLOC_HEAP) || defined(__DOXYGEN__)
static void dyn1_setup(void) {
chHeapInit(&heap1, test.buffer, sizeof(union test_buffers));
@@ -123,9 +124,9 @@ ROMCONST struct testcase testdyn1 = {
NULL,
dyn1_execute
};
-#endif /* CH_USE_HEAP */
+#endif /* (CH_USE_HEAP && !CH_USE_MALLOC_HEAP) */
-#if CH_USE_MEMPOOLS
+#if CH_USE_MEMPOOLS || defined(__DOXYGEN__)
/**
* @page test_dynamic_002 Threads creation from Memory Pool
*
@@ -181,7 +182,8 @@ ROMCONST struct testcase testdyn2 = {
};
#endif /* CH_USE_MEMPOOLS */
-#if CH_USE_HEAP && CH_USE_REGISTRY
+#if (CH_USE_HEAP && !CH_USE_MALLOC_HEAP && CH_USE_REGISTRY) || \
+ defined(__DOXYGEN__)
/**
* @page test_dynamic_003 Registry and References test
*
@@ -250,14 +252,15 @@ ROMCONST struct testcase testdyn3 = {
* @brief Test sequence for dynamic APIs.
*/
ROMCONST struct testcase * ROMCONST patterndyn[] = {
-#if CH_USE_DYNAMIC
-#if CH_USE_HEAP
+#if CH_USE_DYNAMIC || defined(__DOXYGEN__)
+#if (CH_USE_HEAP && !CH_USE_MALLOC_HEAP) || defined(__DOXYGEN__)
&testdyn1,
#endif
-#if CH_USE_MEMPOOLS
+#if CH_USE_MEMPOOLS || defined(__DOXYGEN__)
&testdyn2,
#endif
-#if CH_USE_HEAP && CH_USE_REGISTRY
+#if (CH_USE_HEAP && !CH_USE_MALLOC_HEAP && CH_USE_REGISTRY) || \
+ defined(__DOXYGEN__)
&testdyn3,
#endif
#endif