/demos/trunk/base/jointest.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: jointest.c,v 1.2 2004-04-17 11:36:14 giacomo Exp $ |
* CVS : $Id: jointest.c,v 1.3 2005-01-08 14:31:38 pj Exp $ |
This test verify the correctness of the task_join primitive. (that |
function is the same as pthread_join... someday I will change the |
207,7 → 207,7 |
sys_gettime(&t); |
} while (t.tv_sec < 10); |
sys_end(); |
exit(0); |
return 0; |
/demos/trunk/base/aster1.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: aster1.c,v 1.3 2004-04-17 11:36:12 giacomo Exp $ |
* CVS : $Id: aster1.c,v 1.4 2005-01-08 14:31:38 pj Exp $ |
this is a reduced verion of the classic Hartik demo Aster. |
152,7 → 152,7 |
p1 = task_create("Aster",aster,&m,NULL); |
if (p1 == -1) { |
sys_shutdown_message("Aster.C(main): Could not create task <aster> ..."); |
sys_end(); |
exit(1); |
} |
hard_task_def_mit(m,500000); |
159,7 → 159,7 |
p2 = task_create("Clock",clock,&m,NULL); |
if (p2 == -1) { |
sys_shutdown_message("Aster.C(main): Could not create task <Clock> ..."); |
sys_end(); |
exit(1); |
} |
group_activate(1); |
168,7 → 168,7 |
sys_gettime(&t); |
} while (t.tv_sec < 10); |
sys_end(); |
exit(0); |
return 0; |
} |
/demos/trunk/base/aster2.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: aster2.c,v 1.4 2004-04-19 14:48:04 giacomo Exp $ |
* CVS : $Id: aster2.c,v 1.5 2005-01-08 14:31:38 pj Exp $ |
this is a part of the classic Hartik demo Aster. |
208,7 → 208,7 |
p1 = task_create("Aster",aster,&m,NULL); |
if (p1 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <aster> ..."); |
sys_end(); |
exit(1); |
} |
hard_task_def_mit(m,500000); |
216,13 → 216,13 |
p2 = task_create("Clock",clock,&m,NULL); |
if (p2 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <Clock> ..."); |
sys_end(); |
exit(1); |
} |
p3 = task_create("JetControl",jetcontrol,&m_nrt,NULL); |
if (p2 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <JetControl> ..."); |
sys_end(); |
exit(1); |
} |
group_activate(1); |
231,7 → 231,7 |
sys_gettime(&t); |
} while (t.tv_sec < END_TEST_TIME); |
sys_end(); |
exit(0); |
return 0; |
} |
/demos/trunk/base/mdemo.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: mdemo.c,v 1.2 2004-04-17 11:36:14 giacomo Exp $ |
* CVS : $Id: mdemo.c,v 1.3 2005-01-08 14:31:38 pj Exp $ |
This test verify the correctness of the NOP module. It works with the |
PI, PC, SRP module, too. |
183,7 → 183,7 |
sys_gettime(&t); |
} while (t.tv_sec < 60); |
sys_end(); |
exit(0); |
return 0; |
} |
/demos/trunk/base/aster3.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: aster3.c,v 1.5 2004-04-19 14:48:04 giacomo Exp $ |
* CVS : $Id: aster3.c,v 1.6 2005-01-08 14:31:38 pj Exp $ |
Test Number 10 (A): |
251,7 → 251,7 |
p1 = task_create("Aster",aster,&m,NULL); |
if (p1 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <aster> ..."); |
sys_end(); |
exit(1); |
} |
hard_task_def_mit(m,500000); |
259,7 → 259,7 |
p2 = task_create("Clock",clock,&m,NULL); |
if (p2 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <Clock> ..."); |
sys_end(); |
exit(1); |
} |
soft_task_default_model(m_aper); |
271,7 → 271,7 |
aper_table[0] = task_create("JetControl",jetcontrol,&m_aper,NULL); |
if (aper_table[0] == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <JetControl> ..."); |
sys_end(); |
exit(1); |
} |
for (i=1; i<APER_MAX; i++) { |
280,7 → 280,7 |
aper_table[i] = task_create("aper",aper_asteroid,&m_aper,NULL); |
if (aper_table[i] == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <aper> ..."); |
sys_end(); |
exit(1); |
} |
} |
294,7 → 294,7 |
} while (t.tv_sec < 60); |
} |
sys_end(); |
exit(0); |
return 0; |
} |
/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.3 2004-04-19 14:48:04 giacomo Exp $ |
* CVS : $Id: aster4.c,v 1.4 2005-01-08 14:31:38 pj Exp $ |
Test Number 13 (D): |
105,6 → 105,8 |
PID aper_table[APER_MAX]; |
int shutting_down = 0; |
TASK asteroide(void) |
{ |
int i; |
159,6 → 161,11 |
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," "); |
308,9 → 315,15 |
void endfun(KEY_EVT *k) |
{ |
sys_end(); |
exit(0); |
} |
void exiting(void *arg) |
{ |
cprintf("System shut down...\n"); |
shutting_down = 1; |
} |
int main(int argc, char **argv) |
{ |
KEY_EVT k; |
329,6 → 342,8 |
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); |
346,8 → 361,7 |
p1 = task_create("Aster",aster,&m,NULL); |
if (p1 == -1) { |
sys_shutdown_message("aster4.c(main): Could not create task <aster> ..."); |
sys_end(); |
return 0; |
exit(0); |
} |
hard_task_def_mit(m,500000); |
355,15 → 369,13 |
p2 = task_create("Clock",clock,&m,NULL); |
if (p2 == -1) { |
sys_shutdown_message("aster4.c(main): Could not create task <Clock> ..."); |
sys_end(); |
return 0; |
exit(0); |
} |
p3 = task_create("JetControl",jetcontrol,&m_soft,NULL); |
if (p3 == -1) { |
sys_shutdown_message("aster4.c(main): Could not create task <JetControl> ..."); |
sys_end(); |
return 0; |
exit(0); |
} |
soft_task_default_model(m_aper); |
378,8 → 390,7 |
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> ..."); |
sys_end(); |
return 0; |
exit(0); |
} |
} |
/demos/trunk/base/aster5.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: aster5.c,v 1.4 2004-04-19 14:48:04 giacomo Exp $ |
* CVS : $Id: aster5.c,v 1.5 2005-01-08 14:31:38 pj Exp $ |
this is a part of the classic Hartik demo Aster. |
355,8 → 355,7 |
void fine(KEY_EVT *e) |
{ |
sys_end(); |
} |
exit(0);} |
int main(int argc, char **argv) |
{ |
417,8 → 416,7 |
p1 = task_create("Aster",aster,&m,NULL); |
if (p1 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <aster> ..."); |
sys_end(); |
return 0; |
exit(1); |
} |
hard_task_def_mit(m,500000); |
426,8 → 424,7 |
p2 = task_create("Clock",clock,&m,NULL); |
if (p2 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <Clock> ..."); |
sys_end(); |
return 0; |
exit(1); |
} |
// p3 = task_create("JetControl",jetcontrol,&m_nrt,NULL); |
434,8 → 431,7 |
p3 = task_create("JetControl",jetcontrol,&m_soft,NULL); |
if (p2 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <JetControl> ..."); |
sys_end(); |
return 0; |
exit(1); |
} |
/* |
aperiodic_task_default_model(m_aper,APER_WCET); |
448,8 → 444,7 |
aper_table[i] = task_create("aper",aper_asteroid,&m_aper,NULL); |
if (aper_table[i] == -1) { |
perror("test7.c(main): Could not create task <aper> ..."); |
sys_end(); |
l1_exit(-1); |
exit(1); |
} |
} |
*/ |
/demos/trunk/base/aster6.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: aster6.c,v 1.5 2004-04-21 14:55:05 giacomo Exp $ |
* CVS : $Id: aster6.c,v 1.6 2005-01-08 14:31:38 pj Exp $ |
this is a part of the classic Hartik demo Aster. |
338,7 → 338,7 |
void fine(KEY_EVT *e) |
{ |
sys_end(); |
exit(0); |
} |
400,8 → 400,7 |
p1 = task_create("Aster",aster,&m,NULL); |
if (p1 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <aster> ..."); |
sys_end(); |
return 0; |
exit(1); |
} |
hard_task_def_mit(m,500000); |
409,8 → 408,7 |
p2 = task_create("Clock",clock,&m,NULL); |
if (p2 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <Clock> ..."); |
sys_end(); |
return 0; |
exit(1); |
} |
// p3 = task_create("JetControl",jetcontrol,&m_nrt,NULL); |
417,8 → 415,7 |
p3 = task_create("JetControl",jetcontrol,&m_aper,NULL); |
if (p3 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <JetControl> ..."); |
sys_end(); |
return 0; |
exit(1); |
} |
task_nopreempt(); |
/demos/trunk/base/aster7.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: aster7.c,v 1.4 2004-04-21 14:55:05 giacomo Exp $ |
* CVS : $Id: aster7.c,v 1.5 2005-01-08 14:31:38 pj Exp $ |
this is a part of the classic Hartik demo Aster. |
231,7 → 231,7 |
void fine(KEY_EVT *e) |
{ |
sys_end(); |
exit(0); |
} |
269,8 → 269,7 |
p1 = task_create("Aster",aster,&m,NULL); |
if (p1 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <aster> ..."); |
sys_end(); |
return 0; |
exit(1); |
} |
hard_task_def_mit(m,500000); |
278,8 → 277,7 |
p2 = task_create("Clock",clock,&m,NULL); |
if (p2 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <Clock> ..."); |
sys_end(); |
return 0; |
exit(1); |
} |
soft_task_default_model(m_aper); |
290,8 → 288,7 |
p3 = task_create("JetControl",jetcontrol,&m_aper,NULL); |
if (p3 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <JetControl> ..."); |
sys_end(); |
return 0; |
exit(1); |
} |
soft_task_def_wcet(m_aper,APER_WCET); |
304,8 → 301,7 |
aper_table[i] = task_create("aper",aper_asteroid,&m_aper,NULL); |
if (aper_table[i] == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <aper> ..."); |
sys_end(); |
return 0; |
exit(1); |
} |
} |
/demos/trunk/base/aster8.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: aster8.c,v 1.4 2004-04-21 14:55:05 giacomo Exp $ |
* CVS : $Id: aster8.c,v 1.5 2005-01-08 14:31:38 pj Exp $ |
Test for Sporadic Server (ss): |
357,7 → 357,7 |
void fine(KEY_EVT *e) |
{ |
sys_end(); |
exit(0); |
} |
443,7 → 443,7 |
p1 = task_create("Aster",aster,&m,NULL); |
if (p1 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <aster> ..."); |
sys_end(); |
exit(1); |
return 0; |
} |
452,7 → 452,7 |
p2 = task_create("Clock",clock,&m,NULL); |
if (p2 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <Clock> ..."); |
sys_end(); |
exit(1); |
return 0; |
} |
459,7 → 459,7 |
p3 = task_create("JetControl",jetcontrol,&m_aper,NULL); |
if (p3 == -1) { |
sys_shutdown_message("test7.c(main): Could not create task <JetControl> ..."); |
sys_end(); |
exit(1); |
return 0; |
} |
466,7 → 466,7 |
p4 = task_create("MyDummyAper",(void *(*)(void*))mydummyaper,&m_aper,NULL); |
if (p4 == -1) { |
sys_shutdown_message("Could not create task <MyDummyAper> ..."); |
sys_end(); |
exit(1); |
return 0; |
} |
473,7 → 473,7 |
p5 = task_create("MyDummyNRT",(void *(*)(void*))mydummynrt,&m_nrt,NULL); |
if (p5 == -1) { |
sys_shutdown_message("Could not create task <MyDummyNRT> ..."); |
sys_end(); |
exit(1); |
return 0; |
} |
/demos/trunk/base/cabs.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: cabs.c,v 1.7 2004-04-23 07:57:33 giacomo Exp $ |
* CVS : $Id: cabs.c,v 1.8 2005-01-08 14:31:38 pj Exp $ |
*/ |
/*--------------------------------------------------------------*/ |
92,7 → 92,7 |
*/ |
void my_end(KEY_EVT* e) |
{ |
sys_end(); |
exit(0); |
} |
/******************************************************************/ |
107,7 → 107,7 |
Since the exception handler already exits from the graphic mode, |
this funcion has not to be called. For this reason: |
. we registered byebye using the flag NO_AT_ABORT |
. the exception handler exits using sys_abort; in that way byebye is |
. the exception handler exits using exit; in that way byebye is |
NOT called |
*/ |
133,7 → 133,7 |
create_channel(c-'1'); |
} |
sys_end(); |
exit(0); |
return 0; |
} |
239,7 → 239,7 |
p1[i] = task_create(pname1[i], producer, &m, NULL); |
if (p1[i] == NIL) { |
sys_shutdown_message("Could not create task <producer>"); |
sys_end(); |
exit(1); |
return; |
} |
task_activate(p1[i]); |
253,7 → 253,7 |
p2[i] = task_create(pname2[i], consumer, &m, NULL); |
if (p2[i] == NIL) { |
sys_shutdown_message("Could not create task <consumer>"); |
sys_end(); |
exit(1); |
return; |
} |
task_activate(p2[i]); |
/demos/trunk/base/initgraph.c |
---|
120,7 → 120,7 |
shutdown_task_PID = task_create("Shutdown Task",shutdown_task_body,&nrt,NULL); |
if (shutdown_task_PID == NIL) { |
sys_shutdown_message("Error: Cannot create shutdown task\n"); |
sys_end(); |
exit(0); |
} |
} |
147,7 → 147,7 |
cprintf("Error: Cannot open graphical mode\n"); |
KEYB26_close(); |
INPUT26_close(); |
sys_end(); |
exit(0); |
} |
FB26_use_grx(FRAME_BUFFER_DEVICE); |
191,8 → 191,6 |
sys_shutdown_message("-- S.Ha.R.K. Closed --\n"); |
sys_abort_shutdown(0); |
return NULL; |
} |
/demos/trunk/base/fly.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: fly.c,v 1.9 2004-06-15 14:10:23 giacomo Exp $ |
CVS : $Id: fly.c,v 1.10 2005-01-08 14:31:38 pj Exp $ |
File: $File$ |
Revision: $Revision: 1.9 $ |
Last update: $Date: 2004-06-15 14:10:23 $ |
Revision: $Revision: 1.10 $ |
Last update: $Date: 2005-01-08 14:31:38 $ |
------------ |
**/ |
184,8 → 184,7 |
pid = task_create("fly", fly, &m, NULL); |
if (pid == NIL) { |
sys_shutdown_message("Could not create task <fly>"); |
sys_end(); |
return 0; |
exit(1); |
} |
task_activate(pid); |
i++; |
194,7 → 193,7 |
} while (c != ESC); |
sys_end(); |
exit(0); |
return 0; |
/demos/trunk/base/time.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: time.c,v 1.1 2002-10-28 08:13:37 pj Exp $ |
* CVS : $Id: time.c,v 1.2 2005-01-08 14:31:38 pj Exp $ |
* |
* Timer correctness test |
*/ |
60,7 → 60,7 |
if (TIMESPEC_A_LT_B(&t[0],&t[1])) { |
for (i=0; i<NT; i++) |
cprintf("%d %ld\n",i, t[i].tv_nsec); |
sys_end(); |
exit(0); |
} |
} while (t[0].tv_sec < 1); |
/demos/trunk/base/intsem.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: intsem.c,v 1.2 2004-04-17 11:36:14 giacomo Exp $ |
* CVS : $Id: intsem.c,v 1.3 2005-01-08 14:31:38 pj Exp $ |
this test is a simple main() function with one other task. |
103,7 → 103,7 |
sys_gettime(&t); |
} while (t.tv_sec < 10); |
sys_end(); |
exit(0); |
return 0; |
} |
/demos/trunk/base/initfile.c |
---|
105,7 → 105,7 |
shutdown_task_PID = task_create("Shutdown Task",shutdown_task_body,&nrt,NULL); |
if (shutdown_task_PID == NIL) { |
sys_shutdown_message("Error: Cannot create shutdown task\n"); |
sys_end(); |
exit(1); |
} |
} |
157,8 → 157,6 |
sys_shutdown_message("-- S.Ha.R.K. Closed --\n"); |
sys_abort_shutdown(0); |
return NULL; |
} |
/demos/trunk/base/pcdemo.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: pcdemo.c,v 1.3 2004-04-17 11:36:14 giacomo Exp $ |
* CVS : $Id: pcdemo.c,v 1.4 2005-01-08 14:31:38 pj Exp $ |
This test verify the correctness of the PC module. |
196,7 → 196,7 |
sys_gettime(&t); |
} while (t.tv_sec < 10); |
sys_end(); |
exit(0); |
return 0; |
/demos/trunk/base/srpdemo.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: srpdemo.c,v 1.3 2004-04-17 11:36:15 giacomo Exp $ |
* CVS : $Id: srpdemo.c,v 1.4 2005-01-08 14:31:38 pj Exp $ |
This test verify the correctness of the SRP module. |
228,7 → 228,7 |
sys_gettime(&t); |
} while (t.tv_sec < 60); |
sys_end(); |
exit(0); |
return 0; |
} |
/demos/trunk/base/ego.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: ego.c,v 1.6 2004-04-19 14:48:05 giacomo Exp $ |
CVS : $Id: ego.c,v 1.7 2005-01-08 14:31:38 pj Exp $ |
File: $File$ |
Revision: $Revision: 1.6 $ |
Last update: $Date: 2004-04-19 14:48:05 $ |
Revision: $Revision: 1.7 $ |
Last update: $Date: 2005-01-08 14:31:38 $ |
------------ |
**/ |
107,7 → 107,7 |
*/ |
void my_end(KEY_EVT* e) |
{ |
sys_end(); |
exit(0); |
} |
/******************************************************************/ |
122,7 → 122,7 |
Since the exception handler already exits from the graphic mode, |
this funcion has not to be called. For this reason: |
. we registered byebye using the flag NO_AT_ABORT |
. the exception handler exits using sys_abort; in that way byebye is |
. the exception handler exits using exit; in that way byebye is |
NOT called |
*/ |
155,8 → 155,7 |
pid1 = task_create("ego1", ego, &m1, NULL); |
if (pid1 == NIL) { |
sys_shutdown_message("Could not create task <ego1>"); |
sys_end(); |
return 0; |
exit(1); |
} |
/* ego2 creation */ |
169,8 → 168,7 |
pid2 = task_create("ego2", ego, &m2, NULL); |
if (pid2 == NIL) { |
sys_shutdown_message("Could not create task <ego2>"); |
sys_end(); |
return 0; |
exit(1); |
} |
/* ego3 creation */ |
183,8 → 181,7 |
pid3 = task_create("ego3", ego, &m3, NULL); |
if (pid3 == NIL) { |
sys_shutdown_message("Could not create task <ego3>"); |
sys_end(); |
return 0; |
exit(1); |
} |
/* and finally we activate the three threads... */ |
/demos/trunk/base/iaster4.c |
---|
123,7 → 123,7 |
shutdown_task_PID = task_create("Shutdown Task",shutdown_task_body,&nrt,NULL); |
if (shutdown_task_PID == NIL) { |
sys_shutdown_message("Error: Cannot create shutdown task\n"); |
sys_end(); |
exit(1); |
} |
} |
175,8 → 175,6 |
sys_shutdown_message("-- S.Ha.R.K. Closed --\n"); |
sys_abort_shutdown(0); |
return NULL; |
} |
/demos/trunk/base/preempt.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: preempt.c,v 1.3 2004-04-19 14:48:05 giacomo Exp $ |
* CVS : $Id: preempt.c,v 1.4 2005-01-08 14:31:38 pj Exp $ |
CBS test with preemption disabling |
109,7 → 109,7 |
if (p == NIL) |
{ |
sys_shutdown_message("Can't create save task...\n"); |
sys_end(); |
exit(1); |
} |
soft_task_def_skip_arrivals(m_aper); |
119,7 → 119,7 |
if (p == NIL) |
{ |
sys_shutdown_message("Can't create skip task...\n"); |
sys_end(); |
exit(1); |
} |
p = task_create("blocker", blocker, &m, NULL); |
126,7 → 126,7 |
if (p == NIL) |
{ |
sys_shutdown_message("Can't create blocker task...\n"); |
sys_end(); |
exit(1); |
} |
cprintf("main : save & skip tasks activated.\n"); |
/demos/trunk/base/iaster6.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: iaster6.c,v 1.4 2004-05-24 17:20:44 giacomo Exp $ |
CVS : $Id: iaster6.c,v 1.5 2005-01-08 14:31:38 pj Exp $ |
File: $File$ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2004-05-24 17:20:44 $ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2005-01-08 14:31:38 $ |
------------ |
System initialization file |
165,7 → 165,7 |
shutdown_task_PID = task_create("Shutdown Task",shutdown_task_body,&nrt,NULL); |
if (shutdown_task_PID == NIL) { |
sys_shutdown_message("Error: Cannot create shutdown task\n"); |
sys_end(); |
exit(1); |
} |
} |
217,8 → 217,6 |
sys_shutdown_message("-- S.Ha.R.K. Closed --\n"); |
sys_abort_shutdown(0); |
return NULL; |
} |
/demos/trunk/base/pidemo.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: pidemo.c,v 1.3 2004-04-17 11:36:14 giacomo Exp $ |
* CVS : $Id: pidemo.c,v 1.4 2005-01-08 14:31:38 pj Exp $ |
This test verify the correctness of the PI module. |
116,7 → 116,7 |
sys_gettime(&t); |
} while (t.tv_sec < 10); |
sys_end(); |
exit(0); |
return 0; |
/demos/trunk/base/iaster7.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: iaster7.c,v 1.4 2004-05-24 17:20:45 giacomo Exp $ |
CVS : $Id: iaster7.c,v 1.5 2005-01-08 14:31:38 pj Exp $ |
File: $File$ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2004-05-24 17:20:45 $ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2005-01-08 14:31:38 $ |
------------ |
System initialization file |
151,7 → 151,7 |
shutdown_task_PID = task_create("Shutdown Task",shutdown_task_body,&nrt,NULL); |
if (shutdown_task_PID == NIL) { |
sys_shutdown_message("Error: Cannot create shutdown task\n"); |
sys_end(); |
exit(1); |
} |
} |
203,8 → 203,6 |
sys_shutdown_message("-- S.Ha.R.K. Closed --\n"); |
sys_abort_shutdown(0); |
return NULL; |
} |
/demos/trunk/base/aster.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: aster.c,v 1.4 2004-04-18 19:46:29 giacomo Exp $ |
* CVS : $Id: aster.c,v 1.5 2005-01-08 14:31:38 pj Exp $ |
Author: Gerardo Lamastra |
Giuseppe Lipari |
313,7 → 313,7 |
p1 = task_create("Aster",aster,&m_soft,NULL); |
if (p1 == -1) { |
perror("Aster.C(main): Could not create task <aster>"); |
sys_abort(-1); |
exit(-1); |
} |
hard_task_default_model(m_per); |
323,8 → 323,7 |
p2 = task_create("Clock",clock,&m_per,NULL); |
if (p2 == -1) { |
sys_shutdown_message("Aster.C(main): Could not create task <Clock>"); |
sys_end(); |
return 0; |
exit(1); |
} |
soft_task_def_period(m_soft, 50000); |
331,8 → 330,7 |
p3 = task_create("Title",title,&m_soft, NULL); |
if (p3 == -1) { |
sys_shutdown_message("Aster.C(main): Could not create task <Title>"); |
sys_end(); |
return 0; |
exit(1); |
} |
soft_task_def_period(m_soft, 1000000); |
339,8 → 337,7 |
p4 = task_create("Put",put,&m_soft, NULL); |
if (p4 == -1) { |
sys_shutdown_message("Aster.C(main): Could not create task <Put>"); |
sys_end(); |
return 0; |
exit(1); |
} |
nrt_task_default_model(m_nrt); |
348,8 → 345,7 |
p5 = task_create("Write",write_keyb,&m_nrt,NULL); |
if (p5 == -1) { |
sys_shutdown_message("Aster.C(main): Could not create task <Write>"); |
sys_end(); |
return 0; |
exit(1); |
} |
hard_task_def_mit(m_per, 50000); |
356,8 → 352,7 |
p6 = task_create("CabTask",ccc,&m_per,NULL); |
if (p6 == -1) { |
sys_shutdown_message("Aster.C(main): Could not create task <CabTask>\n"); |
sys_end(); |
return 0; |
exit(1); |
} |
group_activate(1); |
375,7 → 370,7 |
set_visual_page(0); |
#endif |
sys_end(); |
exit(0); |
return 0; |
/demos/trunk/base/iaster8.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: iaster8.c,v 1.4 2004-05-24 17:20:45 giacomo Exp $ |
CVS : $Id: iaster8.c,v 1.5 2005-01-08 14:31:38 pj Exp $ |
File: $File$ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2004-05-24 17:20:45 $ |
Revision: $Revision: 1.5 $ |
Last update: $Date: 2005-01-08 14:31:38 $ |
------------ |
System initialization file |
165,7 → 165,7 |
shutdown_task_PID = task_create("Shutdown Task",shutdown_task_body,&nrt,NULL); |
if (shutdown_task_PID == NIL) { |
sys_shutdown_message("Error: Cannot create shutdown task\n"); |
sys_end(); |
exit(1); |
} |
} |
217,8 → 217,6 |
sys_shutdown_message("-- S.Ha.R.K. Closed --\n"); |
sys_abort_shutdown(0); |
return NULL; |
} |
/demos/trunk/base/sig.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: sig.c,v 1.3 2003-01-07 17:10:15 pj Exp $ |
CVS : $Id: sig.c,v 1.4 2005-01-08 14:31:38 pj Exp $ |
File: $File$ |
Revision: $Revision: 1.3 $ |
Last update: $Date: 2003-01-07 17:10:15 $ |
Revision: $Revision: 1.4 $ |
Last update: $Date: 2005-01-08 14:31:38 $ |
------------ |
**/ |
56,7 → 56,6 |
sigemptyset |
sigaddset |
hartik_deliver_pending_signals |
sys_end |
task_sigmask |
sigaction |
sigqueue |
/demos/trunk/base/condtest.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: condtest.c,v 1.2 2004-04-17 11:36:13 giacomo Exp $ |
* CVS : $Id: condtest.c,v 1.3 2005-01-08 14:31:38 pj Exp $ |
This test verify the correctness of the condition variables. |
(... it doesn't test all...) |
202,7 → 202,7 |
sys_gettime(&t); |
} while (t.tv_sec < 10); |
sys_end(); |
exit(1); |
return 0; |
/demos/trunk/base/ipcidemo.c |
---|
84,7 → 84,7 |
shutdown_task_PID = task_create("Shutdown Task",shutdown_task_body,&nrt,NULL); |
if (shutdown_task_PID == NIL) { |
sys_shutdown_message("Error: Cannot create shutdown task\n"); |
sys_end(); |
exit(1); |
} |
} |
111,8 → 111,6 |
sys_shutdown_message("-- S.Ha.R.K. Closed --\n"); |
sys_abort_shutdown(0); |
return NULL; |
} |
/demos/trunk/base/semdemo.c |
---|
34,7 → 34,7 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* |
* |
* CVS : $Id: semdemo.c,v 1.2 2004-04-17 11:36:15 giacomo Exp $ |
* CVS : $Id: semdemo.c,v 1.3 2005-01-08 14:31:38 pj Exp $ |
This is a really simple semaphore demo. |
99,7 → 99,7 |
sys_gettime(&t); |
} while (t.tv_sec < 10); |
sys_end(); |
exit(0); |
return 0; |
} |