Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1448 → Rev 1468

/demos/trunk/bca/initfile.c
38,7 → 38,7
#include "kernel/kern.h"
#include "modules/intdrive.h"
#include "modules/edf.h"
#include "modules/hardcbs.h"
#include "modules/cbs.h"
#include "modules/rr.h"
#include "modules/dummy.h"
 
84,7 → 84,7
 
INTDRIVE_register_level(INTDRIVE_Q,INTDRIVE_T,INTDRIVE_FLAG);
EDF_register_level(EDF_ENABLE_ALL);
HCBS_register_level(HCBS_ENABLE_ALL, 1);
CBS_register_level(CBS_ENABLE_ALL, 1);
RR_register_level(RRTICK, RR_MAIN_YES, mb);
dummy_register_level();
 
/demos/trunk/bca/missile.c
18,7 → 18,7
* http://shark.sssup.it
*/
 
/* CVS : $Id: missile.c,v 1.2 2004-05-23 08:59:28 giacomo Exp $ */
/* CVS : $Id: missile.c,v 1.3 2004-05-25 18:24:59 giacomo Exp $ */
 
/*
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it>
174,7 → 174,7
PID pid;
 
hard_task_default_model(m);
hard_task_def_level(m,0);
hard_task_def_level(m,1);
hard_task_def_arg(m,(void*)index);
hard_task_def_periodic(m);
hard_task_def_wcet(m, MISSILE_WCET);
190,7 → 190,7
PID pid;
 
soft_task_default_model(m);
soft_task_def_level(m,0);
soft_task_def_level(m,2);
soft_task_def_arg(m,(void*)index);
soft_task_def_periodic(m);
soft_task_def_period(m,MISSILE_PERIOD);
/demos/trunk/bca/cannone.c
18,7 → 18,7
* http://shark.sssup.it
*/
 
/* CVS : $Id: cannone.c,v 1.2 2004-05-23 08:59:27 giacomo Exp $ */
/* CVS : $Id: cannone.c,v 1.3 2004-05-25 18:24:59 giacomo Exp $ */
 
/*
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it>
189,7 → 189,7
PID pid;
 
hard_task_default_model(m);
hard_task_def_level(m,0);
hard_task_def_level(m,1);
hard_task_def_arg(m,(void*)index);
hard_task_def_periodic(m);
hard_task_def_wcet(m, CANNONE_WCET);
205,7 → 205,7
PID pid;
 
soft_task_default_model(m);
soft_task_def_level(m,0);
soft_task_def_level(m,2);
soft_task_def_arg(m,(void*)index);
soft_task_def_periodic(m);
soft_task_def_period(m,CANNONE_PERIOD);
/demos/trunk/bca/esplo.c
18,7 → 18,7
* http://shark.sssup.it
*/
 
/* CVS : $Id: esplo.c,v 1.3 2003-01-07 17:10:16 pj Exp $ */
/* CVS : $Id: esplo.c,v 1.4 2004-05-25 18:24:59 giacomo Exp $ */
 
/*
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it>
53,9 → 53,9
 
soft_task_default_model(m);
soft_task_def_arg(m,(void*)index);
soft_task_def_period(m,ESPLO_PERIOD*5);
soft_task_def_wcet(m,ESPLO_WCET*5);
soft_task_def_met(m,ESPLO_MET*5);
soft_task_def_period(m,ESPLO_PERIOD*2);
soft_task_def_wcet(m,ESPLO_WCET*2);
soft_task_def_met(m,ESPLO_MET*2);
 
pid = task_create("esplo", esplo, &m, NULL);
return pid;
69,8 → 69,8
struct timespec delay;
 
 
delay.tv_sec = (ESPLO_PERIOD-ESPLO_MET)/1000000;
delay.tv_nsec = ((ESPLO_PERIOD-ESPLO_MET)%1000000)*1000;
delay.tv_sec = 0;
delay.tv_nsec = 20000000;
i=0;
index = (int)argv;
xx0 = aereo_table[index].x - ESPLO_LX/2;
78,21 → 78,17
xx1 = xx0 + ESPLO_LX-1;
yy1 = yy0 + ESPLO_LY-1;
 
while(1){
 
for(i=0;i<5;i++) {
mutex_lock(&grx_mutex);
FAB_image_put_within(image_bca,X0,Y0,xx0,yy0,xx1,yy1);
FAB_image_put_within(image_esplo[i],xx0,yy0,X0,Y0,X1,Y1);
mutex_unlock(&grx_mutex);
nanosleep(&delay, NULL);
}
mutex_lock(&grx_mutex);
FAB_image_put_within(image_esplo[i],xx0,yy0,X0,Y0,X1,Y1);
mutex_unlock(&grx_mutex);
task_endcycle();
}
 
mutex_lock(&grx_mutex);
FAB_image_put_within(image_bca,X0,Y0,xx0,yy0,xx1,yy1);
mutex_unlock(&grx_mutex);
return NULL;
 
task_endcycle();
}
return 0;
 
}
/demos/trunk/bca/aereo.c
18,7 → 18,7
* http://shark.sssup.it
*/
 
/* CVS : $Id: aereo.c,v 1.1 2002-10-01 10:25:00 pj Exp $ */
/* CVS : $Id: aereo.c,v 1.2 2004-05-25 18:24:59 giacomo Exp $ */
 
/*
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it>
210,7 → 210,7
PID pid;
 
hard_task_default_model(m);
hard_task_def_level(m,0);
hard_task_def_level(m,1);
hard_task_def_arg(m,(void*)index);
hard_task_def_periodic(m);
hard_task_def_wcet(m, AEREO_WCET);
227,7 → 227,7
PID pid;
 
soft_task_default_model(m);
soft_task_def_level(m,0);
soft_task_def_level(m,2);
soft_task_def_arg(m,(void*)index);
soft_task_def_periodic(m);
soft_task_def_period(m,AEREO_PERIOD);