diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-07-30 14:56:35 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2008-07-30 14:56:35 +0000 |
commit | da290782934b7038dfccd5f76b2b75a792e7304f (patch) | |
tree | 1a80d79f6b22c0723038910b7e4aa8dd25f3ea74 /test | |
parent | e150283e1f071673e1d3490cbf85651e5502d421 (diff) | |
download | ChibiOS-da290782934b7038dfccd5f76b2b75a792e7304f.tar.gz ChibiOS-da290782934b7038dfccd5f76b2b75a792e7304f.tar.bz2 ChibiOS-da290782934b7038dfccd5f76b2b75a792e7304f.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@379 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'test')
-rw-r--r-- | test/test.c | 8 | ||||
-rw-r--r-- | test/test.h | 1 | ||||
-rw-r--r-- | test/testbmk.c | 6 |
3 files changed, 10 insertions, 5 deletions
diff --git a/test/test.c b/test/test.c index 3f2cc9514..2c180ba4b 100644 --- a/test/test.c +++ b/test/test.c @@ -148,6 +148,14 @@ void test_assert_time_window(systime_t start, systime_t end) { /*
* Threads utils.
*/
+void test_terminate_threads(void) {
+ int i;
+
+ for (i = 0; i < MAX_THREADS; i++)
+ if (threads[i])
+ chThdTerminate(threads[i]);
+}
+
void test_wait_threads(void) {
int i;
diff --git a/test/test.h b/test/test.h index 7a2e86f0b..3bee948cd 100644 --- a/test/test.h +++ b/test/test.h @@ -50,6 +50,7 @@ extern "C" { void test_assert(bool_t condition, char * msg);
void test_assert_sequence(char *expected);
void test_assert_time_window(systime_t start, systime_t end);
+ void test_terminate_threads(void);
void test_wait_threads(void);
systime_t test_wait_tick(void);
void test_cpu_pulse(systime_t ms);
diff --git a/test/testbmk.c b/test/testbmk.c index f2fcb94dc..acdfa50e8 100644 --- a/test/testbmk.c +++ b/test/testbmk.c @@ -236,11 +236,7 @@ static void bmk6_execute(void) { ChkIntSources();
#endif
} while (!test_timer_done);
- chThdTerminate(threads[0]);
- chThdTerminate(threads[1]);
- chThdTerminate(threads[2]);
- chThdTerminate(threads[3]);
- chThdTerminate(threads[4]);
+ test_terminate_threads();
chSemReset(&sem1, 0);
test_wait_threads();
|