From: Subrata <sub...@us...> - 2008-02-29 03:55:40
|
Update of /cvsroot/ltp/ltp/testcases/realtime/func/sched_football In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv18308/ltp/testcases/realtime/func/sched_football Modified Files: sched_football.c Log Message: This patch fixes the testcases mismerge due to the patch "There are numerous cleanups, fixes and features went into our ..." from Sudhanshu Singh. Turned out there was less damage than I thought. Hopefully, it should restore the fixes and cleanups which were reverted before the February Release. Signed-off-by: Sebastien Dugue <seb...@bu...> Cc: Sudhanshu Singh < su...@li...> Cc: Chirag <ch...@li...> Cc: Subrata Modak <su...@li...> Index: sched_football.c =================================================================== RCS file: /cvsroot/ltp/ltp/testcases/realtime/func/sched_football/sched_football.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sched_football.c 22 Feb 2008 14:43:58 -0000 1.3 --- sched_football.c 29 Feb 2008 03:55:35 -0000 1.4 *************** *** 82,91 **** static int run_jvmsim=0; void usage(void) { ! rt_help(); ! printf("testpi-1 specific options:\n"); ! printf(" -j enable jvmsim\n"); } --- 82,96 ---- static int run_jvmsim=0; + static int players_per_team = 0; + static int game_length = DEF_GAME_LENGTH; void usage(void) { ! rt_help(); ! printf("sched_football specific options:\n"); ! printf(" -j enable jvmsim\n"); ! printf(" -nPLAYERS players per team (defaults to num_cpus)\n"); ! printf(" -lGAME_LENGTH game length in seconds (defaults to %d s)\n", ! DEF_GAME_LENGTH); } *************** *** 101,104 **** --- 106,115 ---- usage(); exit(0); + case 'n': + players_per_team = atoi(v); + break; + case 'l': + game_length= atoi(v); + break; default: handled = 0; *************** *** 163,172 **** { struct sched_param param; - int players_per_team, game_length; int priority; int i; setup(); ! rt_init("jh",parse_args,argc,argv); if (run_jvmsim) { --- 174,185 ---- { struct sched_param param; int priority; int i; setup(); ! rt_init("n:l:jh",parse_args,argc,argv); ! ! if (players_per_team == 0) ! players_per_team = sysconf(_SC_NPROCESSORS_ONLN); if (run_jvmsim) { *************** *** 177,195 **** } ! if (argc < 2 || argc > 3) { ! printf("Usage: %s players_per_team [game_length (seconds)]\n", argv[0]); ! players_per_team = sysconf(_SC_NPROCESSORS_ONLN); ! game_length = DEF_GAME_LENGTH; ! printf("Using default values: players_per_team=%d game_length=%d\n", ! players_per_team, game_length); ! } ! ! else { ! players_per_team = atoi(argv[1]); ! if (argc == 3) ! game_length = atoi(argv[2]); ! else ! game_length = DEF_GAME_LENGTH; ! } /* We're the ref, so set our priority right */ --- 190,195 ---- } ! printf("Running with: players_per_team=%d game_length=%d\n", ! players_per_team, game_length); /* We're the ref, so set our priority right */ |