From: Thibault Godouet Date: Thu, 5 Oct 2000 14:59:49 +0000 (+0000) Subject: added support for jobs which are both serial and lavg X-Git-Tag: ver2_9_4~544 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53f666c2281d6205498a8750b5360e33dc5922d3;p=thirdparty%2Ffcron.git added support for jobs which are both serial and lavg --- diff --git a/fcron.c b/fcron.c index b98afbf..d3242d7 100644 --- a/fcron.c +++ b/fcron.c @@ -21,11 +21,11 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.c,v 1.30 2000-09-30 11:55:58 thib Exp $ */ + /* $Id: fcron.c,v 1.31 2000-10-05 14:59:49 thib Exp $ */ #include "fcron.h" -char rcs_info[] = "$Id: fcron.c,v 1.30 2000-09-30 11:55:58 thib Exp $"; +char rcs_info[] = "$Id: fcron.c,v 1.31 2000-10-05 14:59:49 thib Exp $"; void main_loop(void); void check_signal(void); @@ -75,6 +75,7 @@ short int serial_running; /* number of running serial jobs */ struct lavg *lavg_array; /* jobs waiting for a given system load value */ short int lavg_array_size; /* size of lavg_array */ short int lavg_num; /* number of job being queued */ +short int lavg_serial_running;/* number of serialized lavg job being running */ struct exe *exe_array; /* jobs which are executed */ short int exe_array_size; /* size of exe_array */ @@ -440,6 +441,7 @@ main(int argc, char **argv) /* initialize lavg_array */ lavg_num = 0; + lavg_serial_running = 0; lavg_array_size = LAVG_INITIAL_SIZE; if ( (lavg_array = calloc(lavg_array_size, sizeof(lavg))) == NULL ) die_e("could not calloc lavg_array"); diff --git a/fcron.h b/fcron.h index e28f595..1b79452 100644 --- a/fcron.h +++ b/fcron.h @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: fcron.h,v 1.12 2000-09-30 11:56:59 thib Exp $ */ + /* $Id: fcron.h,v 1.13 2000-10-05 15:01:23 thib Exp $ */ #ifndef __FCRONH__ #define __FCRONH__ @@ -76,6 +76,7 @@ extern short int exe_num; extern struct lavg *lavg_array; extern short int lavg_array_size; extern short int lavg_num; +extern short int lavg_serial_running; /* end of global variables */