Changeset 11898 for trunk/Ohana/src/opihi/pantasks/CheckTasks.c
- Timestamp:
- Feb 19, 2007, 3:18:27 PM (19 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/opihi/pantasks/CheckTasks.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/opihi/pantasks/CheckTasks.c
r11324 r11898 6 6 Task *task; 7 7 int status; 8 struct timeval now; 8 9 9 10 /** test all tasks: ready to test? ready to run? **/ … … 13 14 14 15 /* ready to test? : check exec period */ 15 if (GetTaskTimer(task[0].last ) < task[0].exec_period) continue;16 if (GetTaskTimer(task[0].last, FALSE) < task[0].exec_period) continue; 16 17 17 18 /* need to check if the current time is within valid/invalid periods */ … … 25 26 } 26 27 if (task[0].NpendingMax && (task[0].Npending >= task[0].NpendingMax)) { 27 fprintf (stderr, "npending: %d, max npending: %d\n", task[0].Npending, task[0].NpendingMax);28 // fprintf (stderr, "npending: %d, max npending: %d\n", task[0].Npending, task[0].NpendingMax); 28 29 gettimeofday (&task[0].last, (void *) NULL); 29 30 continue; 30 31 } 32 33 // gettimeofday (&now, (void *) NULL); 34 // fprintf (stderr, "t0: %d %6d - \n", now.tv_sec, now.tv_usec); 31 35 32 36 /* ready to run? : run task.exec macro */ … … 39 43 } 40 44 45 // gettimeofday (&now, (void *) NULL); 46 // fprintf (stderr, "t1: %d %6d - \n", now.tv_sec, now.tv_usec); 47 41 48 /* check if there are errors with this task */ 42 49 if (!ValidateTask (task, TRUE)) { … … 44 51 continue; 45 52 } 53 54 // gettimeofday (&now, (void *) NULL); 55 // fprintf (stderr, "t2: %d %6d - \n", now.tv_sec, now.tv_usec); 46 56 47 57 /* construct job from task */ 48 58 job = CreateJob (task); 49 59 60 // gettimeofday (&now, (void *) NULL); 61 // fprintf (stderr, "t3: %d %6d - \n", now.tv_sec, now.tv_usec); 62 50 63 /* execute job - XXX add status test */ 51 64 SubmitJob (job); 65 66 // fprintf (stderr, "nl: %d %6d - ", 67 // task[0].last.tv_sec, task[0].last.tv_usec); 52 68 53 69 /* reset timer on task (don't do this if Create/Submit fails) (why not??) */ … … 55 71 task[0].Njobs ++; 56 72 task[0].Npending ++; 73 74 // fprintf (stderr, "%d %6d\n", 75 // task[0].last.tv_sec, task[0].last.tv_usec); 57 76 58 77 /* increment Nrun for inclusive ranges with Nmax */
Note:
See TracChangeset
for help on using the changeset viewer.
