diff options
| author | geniusgogo <[email protected]> | 2013-12-22 21:31:12 +0800 |
|---|---|---|
| committer | geniusgogo <[email protected]> | 2013-12-22 21:31:12 +0800 |
| commit | 4c463f27cbcb5e97099edea89b854831bb47bf30 (patch) | |
| tree | 7143a798176fba7b5f1ceead99065a7a7d04476c /src/idle.c | |
| parent | 7442414a74a909c4e60874c96eded1c739129778 (diff) | |
| parent | 8b1b64567a090ae2df28ae677c896b14241780c2 (diff) | |
Merge branch 'master' into SQLite_on_ARMCC
Diffstat (limited to 'src/idle.c')
| -rw-r--r-- | src/idle.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/idle.c b/src/idle.c index ff3fde21c5..7bca6c28cb 100644 --- a/src/idle.c +++ b/src/idle.c @@ -22,6 +22,8 @@ * 2006-03-23 Bernard the first version * 2010-11-10 Bernard add cleanup callback function in thread exit. * 2012-12-29 Bernard fix compiling warning. + * 2013-12-21 Grissiom let rt_thread_idle_excute loop until there is no + * dead thread. */ #include <rthw.h> @@ -72,8 +74,9 @@ void rt_thread_idle_sethook(void (*hook)(void)) */ void rt_thread_idle_excute(void) { - /* check the defunct thread list */ - if (!rt_list_isempty(&rt_thread_defunct)) + /* Loop until there is no dead thread. So one call to rt_thread_idle_excute + * will do all the cleanups. */ + while (!rt_list_isempty(&rt_thread_defunct)) { rt_base_t lock; rt_thread_t thread; |
