Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1547 → Rev 1546

/demos/trunk/base/aster4.c
34,7 → 34,7
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*
* CVS : $Id: aster4.c,v 1.4 2005-01-08 14:31:38 pj Exp $
* CVS : $Id: aster4.c,v 1.3 2004-04-19 14:48:04 giacomo Exp $
 
Test Number 13 (D):
 
105,8 → 105,6
 
PID aper_table[APER_MAX];
 
int shutting_down = 0;
 
TASK asteroide(void)
{
int i;
161,11 → 159,6
s[0] = c;
puts_xy(i,y,rand()%15+1,s);
 
if (shutting_down) {
cprintf("Ending System Task %d\n",exec_shadow);
return 0;
}
 
task_endcycle();
 
puts_xy(i,y,WHITE," ");
315,15 → 308,9
 
void endfun(KEY_EVT *k)
{
exit(0);
sys_end();
}
 
void exiting(void *arg)
{
cprintf("System shut down...\n");
shutting_down = 1;
}
 
int main(int argc, char **argv)
{
KEY_EVT k;
342,8 → 329,6
 
clear();
cprintf("Press ENTER to end the demo...");
 
sys_atrunlevel(exiting, NULL, RUNLEVEL_SHUTDOWN);
hard_task_default_model(m);
hard_task_def_wcet(m,ASTER_WCET);
361,7 → 346,8
p1 = task_create("Aster",aster,&m,NULL);
if (p1 == -1) {
sys_shutdown_message("aster4.c(main): Could not create task <aster> ...");
exit(0);
sys_end();
return 0;
}
 
hard_task_def_mit(m,500000);
369,13 → 355,15
p2 = task_create("Clock",clock,&m,NULL);
if (p2 == -1) {
sys_shutdown_message("aster4.c(main): Could not create task <Clock> ...");
exit(0);
sys_end();
return 0;
}
 
p3 = task_create("JetControl",jetcontrol,&m_soft,NULL);
if (p3 == -1) {
sys_shutdown_message("aster4.c(main): Could not create task <JetControl> ...");
exit(0);
sys_end();
return 0;
}
 
soft_task_default_model(m_aper);
390,7 → 378,8
aper_table[i] = task_create("aper",aper_asteroid,&m_aper,NULL);
if (aper_table[i] == -1) {
sys_shutdown_message("aster4.c(main): Could not create task <aper> ...");
exit(0);
sys_end();
return 0;
}
}