Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1204 → Rev 1205

/demos/trunk/loader/loader.c
61,7 → 61,11
exec_1 = TIMESPEC2USEC(&l->exec_par_1);
exec_2 = TIMESPEC2USEC(&l->exec_par_2);
exec_3 = TIMESPEC2USEC(&l->exec_par_3);
#ifdef TASK_OUTPUT
printf_xy(exec_shadow % 20 + 60, exec_shadow / 20, GREEN, "S");
#endif
if (l->exec_type == PAR_EXEC_CONST)
exec_cycles = (long long)(exec_1 - cal_rit_start - cal_rit_calc_const)
* CALIBRATION_DELTA / cal_cycles;
77,6 → 81,10
exec_cycles = 0;
 
for (i=0;i<exec_cycles;i++);
 
#ifdef TASK_OUTPUT
printf_xy(exec_shadow % 20 + 60, exec_shadow / 20, WHITE, "E");
#endif
return NULL;
90,7 → 98,7
int act_1,act_2,act_3,next_act;
struct timespec next_time;
static int act=0;
int extra_rit;
int extra_rit, k;
struct loader_task *l = (struct loader_task *)(arg);
act++;
108,11 → 116,19
exec_3 = TIMESPEC2USEC(&l->exec_par_3);
 
extra_rit = cal_rit_start;
 
k = 0;
while(1) {
 
task_testcancel();
 
#ifdef TASK_OUTPUT
k++;
if (k > 15) k = 1;
printf_xy(exec_shadow % 20 + 59, exec_shadow / 20, k,"X");
#endif
 
if (l->act_type == PAR_ACT_MEAN) {
next_act = act_1 + rand() % act_2 - act_2/2;
kern_gettime(&next_time);