--- libaitsched/src/hooks.c 2012/03/13 10:01:59 1.5 +++ libaitsched/src/hooks.c 2012/04/24 13:29:28 1.5.2.1 @@ -3,7 +3,7 @@ * by Michael Pounov * * $Author: misho $ -* $Id: hooks.c,v 1.5 2012/03/13 10:01:59 misho Exp $ +* $Id: hooks.c,v 1.5.2.1 2012/04/24 13:29:28 misho Exp $ * ************************************************************************** The ELWIX and AITNET software is distributed under the following @@ -516,8 +516,10 @@ retry: r->root_eventlo_miss = 0; /* OK, lets get ready task !!! */ - if (!(task = TAILQ_FIRST(&r->root_ready))) - goto retry; + task = TAILQ_FIRST(&r->root_ready); + if (!(task)) + return NULL; + #ifdef HAVE_LIBPTHREAD pthread_mutex_lock(&r->root_mtx[taskREADY]); #endif