31,12 → 31,18 |
{ |
long long i,exec_cycles = 0; |
struct loader_task *l = (struct loader_task *)(arg); |
char tmp[20]; |
#ifdef TASK_OUTPUT |
#ifdef OS_SHARK |
char tmp[20]; |
#endif |
#endif |
|
if (l->act_current == 0) l->act_current = 1; |
#ifdef TASK_OUTPUT |
sprintf(tmp,"[ONESHOT]"); |
printf_xy((get_current_exec_task() % 5) * 9 + 34,get_current_exec_task() / 5 + 5, GREEN, tmp); |
#ifdef OS_SHARK |
sprintf(tmp,"[ONESHOT]"); |
printf_xy((get_current_exec_task() % 5) * 9 + 34,get_current_exec_task() / 5 + 5, GREEN, tmp); |
#endif |
#endif |
|
exec_cycles = (long long)(TIMESPEC2USEC(&l->exec[l->act_current-1])) * CALIBRATION_DELTA / cal_cycles; |
64,15 → 70,22 |
long long i,exec_cycles = 0; |
int act = 0; |
struct loader_task *l = (struct loader_task *)(arg); |
char tmp[20]; |
|
#ifdef TASK_OUTPUT |
#ifdef OS_SHARK |
char tmp[20]; |
#endif |
#endif |
|
if (l->act_current == 0) l->act_current = 1; |
|
while(1) { |
|
#ifdef TASK_OUTPUT |
sprintf(tmp,"C[%06d]",act); |
printf_xy((get_current_exec_task() % 5) * 9 + 34,get_current_exec_task() / 5 + 5, GREEN, tmp); |
#ifdef OS_SHARK |
sprintf(tmp,"C[%06d]",act); |
printf_xy((get_current_exec_task() % 5) * 9 + 34,get_current_exec_task() / 5 + 5, GREEN, tmp); |
#endif |
#endif |
|
exec_cycles = (long long)(TIMESPEC2USEC(&l->exec[l->act_current-1])) * CALIBRATION_DELTA / cal_cycles; |
105,7 → 118,11 |
long long i,exec_cycles = 0; |
int act = 0; |
struct loader_task *l = (struct loader_task *)(arg); |
char tmp[20]; |
#ifdef TASK_OUTPUT |
#ifdef OS_SHARK |
char tmp[20]; |
#endif |
#endif |
|
if (l->act_current == 0) l->act_current = 1; |
|
112,8 → 129,10 |
while(1) { |
|
#ifdef TASK_OUTPUT |
sprintf(tmp,"B[%06d]",act); |
printf_xy((get_current_exec_task() % 5) * 9 + 34,get_current_exec_task() / 5 + 5, GREEN, tmp); |
#ifdef OS_SHARK |
sprintf(tmp,"B[%06d]",act); |
printf_xy((get_current_exec_task() % 5) * 9 + 34,get_current_exec_task() / 5 + 5, GREEN, tmp); |
#endif |
#endif |
|
exec_cycles = (long long)(TIMESPEC2USEC(&l->exec[l->act_current-1])) * CALIBRATION_DELTA / cal_cycles; |
149,16 → 168,6 |
|
switch(current->task_type) { |
case PAR_TASK_OS: |
|
/* generic_task_create( |
server number, |
pthread_t of created task (-1 if failed), |
pthread_attr_t, |
task_body, |
arg of the body (must be "(void *)current"), |
arg for real-time task specification) |
*/ |
|
err = generic_create_thread(generic_get_server_from_contract(current->contract),&j,NULL, |
oneshot_task,(void *)current,generic_get_task_model(current)); |
break; |