version 1.1.2.16, 2013/12/08 21:11:54
|
version 1.1.2.17, 2013/12/12 09:04:22
|
Line 231 io_progOpen(prog_t * __restrict prg, u_int execNum)
|
Line 231 io_progOpen(prog_t * __restrict prg, u_int execNum)
|
* |
* |
* @prg = program pool |
* @prg = program pool |
* @toNum = execute to number of programs (0 max) |
* @toNum = execute to number of programs (0 max) |
* return: 0 error, >0 executed programs and abs(<0) executed programs with logged error | * return: 0 error or nothing to do, |
| * >0 executed programs and abs(<0) executed programs with logged error |
*/ |
*/ |
int |
int |
io_progGrow(prog_t * __restrict prg, u_int toNum) |
io_progGrow(prog_t * __restrict prg, u_int toNum) |
Line 244 io_progGrow(prog_t * __restrict prg, u_int toNum)
|
Line 245 io_progGrow(prog_t * __restrict prg, u_int toNum)
|
} |
} |
if (!toNum) |
if (!toNum) |
toNum = prg->prog_maxn; |
toNum = prg->prog_maxn; |
|
if (toNum < prg->prog_inin) |
|
toNum = prg->prog_inin; |
|
|
|
if ((toNum - prg->prog_cnum) < 1) |
|
return 0; |
|
|
return io_progOpen(prg, toNum - prg->prog_cnum); |
return io_progOpen(prg, toNum - prg->prog_cnum); |
} |
} |
|
|
Line 337 io_progCheck(prog_t * __restrict prg, int re)
|
Line 343 io_progCheck(prog_t * __restrict prg, int re)
|
pthread_mutex_unlock(&prg->prog_mtx); |
pthread_mutex_unlock(&prg->prog_mtx); |
|
|
/* resurrect */ |
/* resurrect */ |
if (re && ret > 0) | if (re && ret > 0 && prg->prog_inin - prg->prog_cnum) |
io_progOpen(prg, ret); | io_progOpen(prg, prg->prog_inin - prg->prog_cnum); |
|
|
return ret; |
return ret; |
} |
} |