Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1249 → Rev 1250

/demos/trunk/loader/nload.c
17,7 → 17,7
/* Activate task output debug */
#define TASK_OUTPUT
 
int cal_cycles = 0; //Calibration const, it converts usec in cycles
int cal_cycles = 0; //Calibration const, it converts usec to cycles
struct timespec zero_time; //Zero time of the simulation
extern struct loader_task loader_task_list[]; //Loader task array
extern int total_loader_task; //Loader task number
149,6 → 149,16
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;
182,15 → 192,20
{
 
extern struct timespec total_time;
 
/* Calibrate the exec time */
generic_calibrate_cycle();
 
/* Create the servers usign defined contracts */
generic_fsfinit();
 
/* Create the tasks */
loader_task_create();
 
/* Start the simulation */
generic_start_simulation();
 
/* Set the simulation end time */
generic_set_simulation_time(&total_time);
 
return 0;