Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1549 → Rev 1550

/demos/trunk/orbit/orbit.c
18,11 → 18,11
 
/*
------------
CVS : $Id: orbit.c,v 1.8 2004-05-23 19:30:33 giacomo Exp $
CVS : $Id: orbit.c,v 1.9 2005-01-08 14:34:48 pj Exp $
 
File: $File$
Revision: $Revision: 1.8 $
Last update: $Date: 2004-05-23 19:30:33 $
Revision: $Revision: 1.9 $
Last update: $Date: 2005-01-08 14:34:48 $
------------
*/
 
227,7 → 227,7
pid = task_create("massa", massa, &m, NULL);
if (pid == NIL) {
sys_shutdown_message("Could not create task");
sys_end();
exit(1);
}
task_activate(pid);
}
235,7 → 235,7
 
} while (c != ESC);
 
sys_end();
exit(1);
 
return 0;
}
/demos/trunk/orbit/initfile.c
122,7 → 122,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);
}
 
}
149,7 → 149,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
193,8 → 193,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/bttvdemo/bttv.c
62,7 → 62,7
void program_end(void *arg)
{
 
sys_end();
exit(0);
}
 
268,7 → 268,7
 
if (argc < 2) {
sys_shutdown_message("ERROR: Enter the input channel [ex> %s 0]\n",argv[0]);
sys_end();
exit(1);
}
 
channel = atoi(argv[1]);
288,13 → 288,13
grab_task_pid = task_create("GrabTask",grab_task,&gt,NULL);
if (grab_task_pid == NIL) {
sys_shutdown_message("ERROR: Cannot create grab task\n");
sys_end();
exit(1);
}
 
elaborate_task_pid = task_create("ElaborateTask",elaborate_task,&et,NULL);
if (grab_task_pid == NIL) {
sys_shutdown_message("ERROR: Cannot create elaborate task\n");
sys_end();
exit(1);
}
 
#ifdef COLOR
333,7 → 333,7
 
sleep(1);
 
sys_end();
exit(1);
 
return 0;
 
/demos/trunk/bttvdemo/initfile.c
93,7 → 93,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);
}
 
}
124,7 → 124,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
170,8 → 170,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/bca/initfile.c
152,7 → 152,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);
}
 
}
179,7 → 179,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
223,8 → 223,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/bca/fab_lib.c
18,7 → 18,7
* http://shark.sssup.it
*/
 
/* CVS : $Id: fab_lib.c,v 1.4 2004-05-23 08:59:27 giacomo Exp $ */
/* CVS : $Id: fab_lib.c,v 1.5 2005-01-08 14:34:28 pj Exp $ */
 
/*
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it>
79,7 → 79,7
 
if (!test) {kern_printf("\n OK: %s.",OkMsg);}
else {kern_printf("\n ERROR: %s!",ErrorMsg);
if (EXITflag==FAB_EXIT_YES) sys_end();
if (EXITflag==FAB_EXIT_YES) exit(0);
}
}
 
/demos/trunk/bca/bca.c
18,7 → 18,7
* http://shark.sssup.it
*/
 
/* CVS : $Id: bca.c,v 1.5 2004-05-23 08:59:27 giacomo Exp $ */
/* CVS : $Id: bca.c,v 1.6 2005-01-08 14:34:28 pj Exp $ */
 
/*
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it>
126,7 → 126,7
 
void end_fun(KEY_EVT* k)
{ sys_shutdown_message("Ending...\n");
sys_end();
exit(0);
}
void incrementa_aerei_fun(KEY_EVT* k)
{ if (aereo_count<AEREO_N_MAX) aereo_count++;
/demos/trunk/first/test.c
298,7 → 298,7
kern_gettime(&endtimer);
endtimer.tv_sec += 20;
kern_event_post(&endtimer, (void (*)(void *))(sys_end), NULL);
kern_event_post(&endtimer, (void (*)(void *))(exit), NULL);
 
hard_task_default_model(ht);
hard_task_def_mit(ht,200000);
/demos/trunk/first/test1.c
258,7 → 258,7
//t1 = task_create("X", edftask, &mhard, NULL);
//if (t1 == NIL) {
// perror("Could not create task X ...");
// sys_end();
// exit(1);
//}
 
hard_task_def_mit(mhard,32000);
267,7 → 267,7
//t2 = task_create("Y", edftask, &mhard, NULL);
//if (t2 == NIL) {
// perror("Could not create task Y ...");
// sys_end();
// exit(1);
//}
 
//group_activate(1);
275,25 → 275,25
err = pthread_create(&j1, NULL, star, (void *)"A");
if (err) {
perror("Could not create task A ...");
sys_end();
exit(1);
}
 
err = pthread_create(&j2, NULL, periodic_star, (void *)"B");
if (err) {
perror("Could not create task B ...");
sys_end();
exit(1);
}
 
err = pthread_create(&j3, NULL, star, (void *)"C");
if (err) {
perror("Could not create task C ...");
sys_end();
exit(1);
}
 
err = pthread_create(&j4, NULL, periodic_star, (void *)"D");
if (err) {
perror("Could not create task D ...");
sys_end();
exit(1);
}
fsf_initialize_contract(&contract1);
378,7 → 378,7
 
} while(ch != ESC);
 
sys_end();
exit(1);
 
return 0;
 
/demos/trunk/first/test2.c
69,11 → 69,11
 
FTrace_send_chunk(main_chunk, 0, FTRACE_CHUNK_FLAG_FREE | FTRACE_CHUNK_FLAG_CYC);
 
sys_end();
exit(0);
 
#else
sys_end();
exit(0);
 
#endif
 
247,7 → 247,7
err = pthread_create(&j, NULL, test_task_variable, NULL);
if (err) {
perror("Could not create task...");
sys_end();
exit(1);
}
 
err=fsf_bind_local_thread_to_server(server, j, (fsf_sched_params_t *)(&pr));
254,7 → 254,7
if (err) {
grx_close();
kern_printf("Could not bind task.. %d", err);
sys_end();
exit(1);
}
 
284,7 → 284,7
if (err) {
grx_close();
perror("Could not create task...");
sys_end();
exit(1);
}
 
err=fsf_bind_local_thread_to_server(server, j,(fsf_sched_params_t *)(&pr));
291,7 → 291,7
if (err) {
grx_close();
perror("Could not bind task..");
sys_end();
exit(1);
}
 
318,7 → 318,7
 
#else
 
sys_end();
exit(0);
 
#endif
}
387,12 → 387,12
if (err) cprintf("(FSF ERROR %d)",err);
//graphic card Initialization
if (grx_init() < 1) {
sys_end();
exit(1);
}
 
if (grx_open(800, 600, 16) < 0) {
cprintf("GRX Err\n");
sys_end();
exit(0);
}
 
layout_screen();
/demos/trunk/first/initfile.c
102,8 → 102,6
 
device_drivers_close();
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
sys_abort_shutdown(0);
 
return NULL;
}
#define SHUTDOWN_TIMEOUT_SEC 3
118,7 → 116,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);
}
 
}
/demos/trunk/astro/rock.c
270,8 → 270,7
pid_RC = task_create("RockCreator", rock_creator, &ms, NULL);
if (pid_RC == NIL) {
sys_shutdown_message("Could not create task <RockCreator>\n");
sys_end();
return;
exit(1);
} else
task_activate(pid_RC);
}
/demos/trunk/astro/initfile.c
89,7 → 89,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);
}
 
}
116,7 → 116,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
160,8 → 160,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/astro/astro.c
372,8 → 372,7
pid = task_create("Astro", astro, &ms, NULL);
if (pid == NIL) {
sys_shutdown_message("Could not create task <astro>\n");
sys_end();
return;
exit(1);
} else
task_activate(pid);
 
385,8 → 384,7
pid = task_create("Taken", look, &mp, NULL);
if (pid == NIL) {
sys_shutdown_message("Could not create task <Taken>\n");
sys_end();
return;
exit(1);
} else
task_activate(pid);
 
401,8 → 399,7
pid_TL = task_create("TurnLeft", turn, &mp, NULL);
if (pid_TL == NIL) {
sys_shutdown_message("Could not create task <Turn L>\n");
sys_end();
return;
exit(1);
}
 
incr = - ASTRO_GRAD_INC;
416,8 → 413,7
pid_TR = task_create("TurnRight", turn, &mp, NULL);
if (pid_TR == NIL) {
sys_shutdown_message("Could not create task <Turn R>\n");
sys_end();
return;
exit(1);
}
 
incr = ASTRO_VEL_INC;
431,8 → 427,7
pid_SU = task_create("SpeedUP", speed, &mp, NULL);
if (pid_SU == NIL) {
sys_shutdown_message("Could not create task <Speed UP>\n");
sys_end();
return;
exit(1);
}
 
incr = - ASTRO_VEL_INC;
446,8 → 441,7
pid_SD = task_create("SpeedDOWN", speed, &mp, NULL);
if (pid_SD == NIL) {
sys_shutdown_message("Could not create task <Speed DOWN>\n");
sys_end();
return;
exit(1);
}
 
incr = 0;
461,8 → 455,7
pid_SZ = task_create("SpeedZERO", speed, &mp, NULL);
if (pid_SZ == NIL) {
sys_shutdown_message("Could not create task <Speed ZERO>\n");
sys_end();
return;
exit(1);
}
 
hard_task_default_model(mp);
473,8 → 466,7
pid = task_create("MoveAstro", move, &mp, NULL);
if (pid == NIL) {
sys_shutdown_message("Could not create task <MoveAstro>\n");
sys_end();
return;
exit(1);
} else
task_activate(pid);
 
490,8 → 482,7
pid_FL = task_create("FlipAstro", turn, &mp, NULL);
if (pid_FL == NIL) {
sys_shutdown_message("Could not create task <Flip Astro>\n");
sys_end();
return;
exit(1);
}
#endif
}
/demos/trunk/astro/asteroid.c
63,8 → 63,7
 
void end_func(KEY_EVT *k) {
 
sys_end();
 
exit(0);
}
 
int main(int argc, char **argv)
/demos/trunk/astro/stat.c
129,8 → 129,7
pid = task_create("StatWrite", stat_write, &ms, NULL);
if (pid == NIL) {
sys_shutdown_message("Could not create task <StatWrite>\n");
sys_end();
return;
exit(1);
} else
task_activate(pid);
}
/demos/trunk/network/initfile.c
108,8 → 108,6
 
device_drivers_close();
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
sys_abort_shutdown(0);
 
return NULL;
}
 
125,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);
}
 
}
/demos/trunk/network/net.c
49,7 → 49,7
strcpy(local_ip, "192.168.1.10");
strcpy(target_ip, "192.168.1.1");
 
if (init_network(local_ip)) sys_end();
if (init_network(local_ip)) exit(1);
 
/* local IP string to addr */
ip_str2addr(local_ip,&(local.s_addr));
76,7 → 76,7
 
cprintf("The End.\n");
 
sys_end();
exit(1);
 
return 0;
}
/demos/trunk/network/talk.c
149,7 → 149,7
void esci(KEY_EVT *k)
{
esc = TRUE;
sys_end();
exit(1);
}
 
int main(int argc, char **argv)
191,7 → 191,7
cprintf("Net Init OK...\n");
} else {
cprintf("Net Init Failed...\n");
sys_abort(300);
exit(300);
}
 
 
/demos/trunk/pngdemo/initfile.c
36,11 → 36,11
*/
 
/*
* CVS : $Id: initfile.c,v 1.2 2003-03-20 14:59:20 giacomo Exp $
* CVS : $Id: initfile.c,v 1.3 2005-01-08 14:38:06 pj Exp $
*
* File: $File$
* Revision: $Revision: 1.2 $
* Last update: $Date: 2003-03-20 14:59:20 $
* Revision: $Revision: 1.3 $
* Last update: $Date: 2005-01-08 14:38:06 $
*/
 
#include "kernel/kern.h"
112,8 → 112,7
root_device=bdev_scan_devices(choose_root_callback);
if (root_device<0) {
cprintf("can't find root device to mount on /!!!\n");
sys_end();
return -1;
exit(1);
}
 
return 0;
/demos/trunk/pngdemo/pngdemo.c
38,7 → 38,7
FILE *fp = fopen(file_name, "rb");
if (!fp) {
cprintf("[read_png_file] File %s could not be opened for reading", file_name);
sys_end();
exit(1);
}
fread(header, 1, 8, fp);
/demos/trunk/mesademo/initfile.c
122,7 → 122,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);
}
 
}
149,7 → 149,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(0);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
193,8 → 193,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/mesademo/mesademo.c
259,7 → 259,7
void program_key_end(KEY_EVT *k)
{
 
sys_end();
exit(0);
 
}
 
274,7 → 274,7
 
}
 
sys_end();
exit(0);
 
}
 
305,7 → 305,7
 
}
 
sys_end();
exit(0);
 
}
 
326,8 → 326,7
 
refresh_PID = task_create("refresh", refresh, &ht_refresh, NULL);
if (refresh_PID == -1) {
sys_end();
return 0;
exit(0);
}
 
hard_task_default_model(ht_disegna);
340,8 → 339,7
 
disegna_PID = task_create("disegna", disegna, &ht_disegna, NULL);
if (disegna_PID == -1) {
sys_end();
return 0;
exit(0);
}
 
{
/demos/trunk/mix/initfile.c
122,7 → 122,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);
}
 
}
149,7 → 149,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
193,8 → 193,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/mix/mix.c
18,11 → 18,11
 
/*
------------
CVS : $Id: mix.c,v 1.6 2004-05-23 11:15:29 giacomo Exp $
CVS : $Id: mix.c,v 1.7 2005-01-08 14:33:10 pj Exp $
 
File: $File$
Revision: $Revision: 1.6 $
Last update: $Date: 2004-05-23 11:15:29 $
Revision: $Revision: 1.7 $
Last update: $Date: 2005-01-08 14:33:10 $
------------
*/
 
151,7 → 151,7
 
void finish1()
{
sys_end();
exit(1);
}
 
/*--------------------------------------------------------------*/
744,7 → 744,7
x = (x + 1) % (LW-10);
}
 
sys_end();
exit(1);
 
return 0;
}
/demos/trunk/pci6025e/test_bms.c
100,7 → 100,7
 
if(!reMap()){
sys = 11;
sys_end();
exit(1);
}
 
soft_task_default_model(show_val_mod);
112,7 → 112,7
if( (show_val_pid = task_create("Show task", show_val_body, &show_val_mod, NULL))
== NIL ){
sys = 20;
sys_end();
exit(1);
}
 
hard_task_default_model(gate_action_model);
121,7 → 121,7
if( (gate_action_pid = task_create("Gate Action", gate_action_body, &gate_action_model, NULL))
== NIL ){
sys = 22;
sys_end();
exit(1);
}
 
drawInterface();
155,7 → 155,7
{
closeEvent(NULL);
 
sys_end();
exit(1);
}
 
void showEvent(KEY_EVT *k)
/demos/trunk/pci6025e/wave.c
91,7 → 91,7
hard_task_def_group(wave0, TASK_GROUP);
if( (wave0_pid = task_create("Wave 0", wave_body, &wave0, NULL)) == NIL ){
sys = 10;
sys_end();
exit(1);
}
 
hard_task_default_model(wave1);
101,7 → 101,7
hard_task_def_group(wave1, TASK_GROUP);
if( (wave1_pid = task_create("Wave 1", wave_body, &wave1, NULL)) == NIL ){
sys = 11;
sys_end();
exit(1);
}
 
hard_task_default_model(video);
111,12 → 111,12
if( (video_pid = task_create("Video task", video_body, &video, NULL))
== NIL ){
sys = 12;
sys_end();
exit(1);
}
 
if(!reMap()){
sys = 21;
sys_end();
exit(1);
}
 
createWaves();
153,7 → 153,7
{
close_event(NULL);
 
sys_end();
exit(1);
}
 
void close_event(void *arg)
/demos/trunk/pci6025e/initfile.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(1);
}
 
}
147,7 → 147,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
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/pci6025e/test_mes.c
100,7 → 100,7
 
if(!reMap()){
sys = 11;
sys_end();
exit(1);
}
 
soft_task_default_model(show_model);
112,7 → 112,7
if( (show_pid = task_create("Show task", show_body, &show_model, NULL))
== NIL ){
sys = 20;
sys_end();
exit(1);
}
 
hard_task_default_model(gating);
121,13 → 121,13
hard_task_def_arg(gating, C0);
if( (c0_gate_pid = task_create("C0 Gate task", gate_body, &gating, NULL)) == NIL ){
sys = 21;
sys_end();
exit(1);
}
 
hard_task_def_arg(gating, (void *)C1);
if( (c1_gate_pid = task_create("C1 Gate task", gate_body, &gating, NULL)) == NIL ){
sys = 22;
sys_end();
exit(1);
}
 
drawInterface();
250,7 → 250,7
{
closeEvent(NULL);
sys_end();
exit(1);
}
 
void gateEvent(KEY_EVT *k)
/demos/trunk/pci6025e/test_dac.c
110,7 → 110,7
pid_m = task_create("Voltage", Voltage_body, &m, NULL);
if(pid_m == NIL){
sys = 30;
sys_end();
exit(1);
}
 
hard_task_default_model(d);
120,13 → 120,13
pid_d = task_create("DAC Check", DAC_Check_body, &d, NULL);
if(pid_d == NIL){
sys = 31;
sys_end();
exit(1);
}
 
//Check if a NI board is on PCI bus
if(!reMap()){
sys = 11;
sys_end();
exit(1);
}
 
drawInterface();
302,7 → 302,7
close_event(NULL);
 
sys_end();
exit(1);
}
 
/*
/demos/trunk/pci6025e/test_ec.c
116,7 → 116,7
soft_task_def_wcet(show_aper_mod, 60000);
if( (show_aper_pid = task_create("Show aperiodic task", show_aper, &show_aper_mod, NULL)) == NIL ){
sys = 10;
sys_end();
exit(1);
}
 
k.flag = 0;
142,12 → 142,12
soft_task_def_period(show_per_mod, 10000);
if( (show_per_pid = task_create("Show periodic task", show_per, &show_per_mod, NULL)) == NIL){
sys = 11;
sys_end();
exit(1);
}
 
if(!reMap()){
sys = 21;
sys_end();
exit(1);
}
 
drawInterface();
303,7 → 303,7
{
close_event(NULL);
 
sys_end();
exit(1);
}
 
void show_evt(KEY_EVT *k)
/demos/trunk/pci6025e/test_ppi.c
72,13 → 72,13
pid_m = task_create("TEST PPI", test_ppi, &m, NULL);
if(pid_m == NIL){
system = 10;
sys_end();
exit(1);
}
 
//Look for a National board on PCI bus
if(!reMap()){
system = 21;
sys_end();
exit(1);
}
 
//Start configuring DIO module
171,7 → 171,7
close_event(NULL);
 
sys_end();
exit(1);
}
 
/*end of file: test_ppi.c*/
/demos/trunk/pci6025e/test_bec.c
108,7 → 108,7
soft_task_def_wcet(show_aper_mod, 60000);
if( (show_aper_pid = task_create("Show aperiodic task", show_aper, &show_aper_mod, NULL)) == NIL ){
sys = 10;
sys_end();
exit(1);
}
 
k.flag = 0;
134,12 → 134,12
soft_task_def_period(show_per_mod, 10000);
if( (show_per_pid = task_create("Show periodic task", show_per, &show_per_mod, NULL)) == NIL){
sys = 11;
sys_end();
exit(1);
}
 
if(!reMap()){
sys = 21;
sys_end();
exit(1);
}
 
drawInterface();
275,7 → 275,7
{
close_event(NULL);
 
sys_end();
exit(1);
}
 
void show_evt(KEY_EVT *k)
/demos/trunk/pci6025e/test_dio.c
73,13 → 73,13
pid_m = task_create("TEST DIO", test_DIO, &m, NULL);
if(pid_m == NIL){
system = 10;
sys_end();
exit(1);
}
 
//Look for a National board on PCI bus
if(!reMap()){
system = 21;
sys_end();
exit(1);
}
 
//Start configuring DIO module
166,6 → 166,6
close_event(NULL);
 
sys_end();
exit(1);
}
 
/demos/trunk/pse51/ptest1.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ptest1.c,v 1.3 2004-05-23 09:07:28 giacomo Exp $
CVS : $Id: ptest1.c,v 1.4 2005-01-08 14:36:11 pj Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2004-05-23 09:07:28 $
Revision: $Revision: 1.4 $
Last update: $Date: 2005-01-08 14:36:11 $
------------
 
Posix test 1:
45,7 → 45,6
cprintf
sys_gettime
keyboard stuffs
sys_end
 
**/
 
/demos/trunk/pse51/ptest2.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ptest2.c,v 1.3 2004-05-23 09:07:28 giacomo Exp $
CVS : $Id: ptest2.c,v 1.4 2005-01-08 14:36:11 pj Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2004-05-23 09:07:28 $
Revision: $Revision: 1.4 $
Last update: $Date: 2005-01-08 14:36:11 $
------------
 
Posix test 2:
42,8 → 42,6
cprintf
sys_gettime
keyboard stuffs
sys_end
 
**/
 
/*
/demos/trunk/pse51/ptest3.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ptest3.c,v 1.3 2004-05-23 09:07:29 giacomo Exp $
CVS : $Id: ptest3.c,v 1.4 2005-01-08 14:36:11 pj Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2004-05-23 09:07:29 $
Revision: $Revision: 1.4 $
Last update: $Date: 2005-01-08 14:36:11 $
------------
 
Posix test 3:
35,7 → 35,6
cprintf
sys_gettime
keyboard stuffs
sys_end
 
**/
 
/demos/trunk/pse51/ptest4.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ptest4.c,v 1.3 2004-05-23 09:07:29 giacomo Exp $
CVS : $Id: ptest4.c,v 1.4 2005-01-08 14:36:11 pj Exp $
 
File: $File$
Revision: $Revision: 1.3 $
Last update: $Date: 2004-05-23 09:07:29 $
Revision: $Revision: 1.4 $
Last update: $Date: 2005-01-08 14:36:11 $
------------
 
Posix test 4:
37,7 → 37,6
cprintf
sys_gettime
keyboard stuffs
sys_end
 
**/
 
/demos/trunk/pse51/ptest5.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ptest5.c,v 1.2 2004-05-23 09:05:51 giacomo Exp $
CVS : $Id: ptest5.c,v 1.3 2005-01-08 14:36:11 pj Exp $
 
File: $File$
Revision: $Revision: 1.2 $
Last update: $Date: 2004-05-23 09:05:51 $
Revision: $Revision: 1.3 $
Last update: $Date: 2005-01-08 14:36:11 $
------------
 
Posix test 5:
32,7 → 32,6
cprintf
sys_gettime
keyboard stuffs
sys_end
 
**/
 
/demos/trunk/pse51/ptest6.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ptest6.c,v 1.2 2004-05-23 09:05:51 giacomo Exp $
CVS : $Id: ptest6.c,v 1.3 2005-01-08 14:36:11 pj Exp $
 
File: $File$
Revision: $Revision: 1.2 $
Last update: $Date: 2004-05-23 09:05:51 $
Revision: $Revision: 1.3 $
Last update: $Date: 2005-01-08 14:36:11 $
------------
 
Posix test 6:
58,7 → 58,6
cprintf
sys_gettime
keyboard stuffs
sys_end
 
**/
 
122,7 → 121,7
x,prio,buf);
 
if (mq_notify(mq, &ev25))
{ cprintf("T2: mq_notify returns errno %d\n",errno); sys_end(); }
{ cprintf("T2: mq_notify returns errno %d\n",errno); exit(1); }
 
cprintf("T2: waiting t = 1 sec.\n");
while (sys_gettime(NULL)<1000000);
129,7 → 128,7
cprintf("T2: 1 sec. reached, sending another message and creating T3 and T4, \n");
 
if (mq_send(mq,"Mickey Mouse",13,1))
{ cprintf("T2: mq_send returns errno %d\n",errno); sys_end(); }
{ cprintf("T2: mq_send returns errno %d\n",errno); exit(1); }
 
pthread_create(&T3, NULL, t3, NULL);
pthread_create(&T4, NULL, t4, NULL);
156,23 → 155,23
cprintf("T3: 2 sec. reached, sending 5 messages\n");
 
if (mq_send(mq,"Goofy",6,1))
{ cprintf("T3: mq_send1 returns errno %d\n",errno); sys_end(); }
{ cprintf("T3: mq_send1 returns errno %d\n",errno); exit(1); }
cprintf("Û");
 
if (mq_send(mq,"Minnie",7,1))
{ cprintf("T3: mq_send2 returns errno %d\n",errno); sys_end(); }
{ cprintf("T3: mq_send2 returns errno %d\n",errno); exit(1); }
cprintf("Û");
 
if (mq_send(mq,"Pluto",6,2)) // NB: different priority!!!
{ cprintf("T3: mq_send3 returns errno %d\n",errno); sys_end(); }
{ cprintf("T3: mq_send3 returns errno %d\n",errno); exit(1); }
cprintf("Û");
 
if (mq_send(mq,"Rocker Duck",12,2)) // NB: different priority!!!
{ cprintf("T3: mq_send4 returns errno %d\n",errno); sys_end(); }
{ cprintf("T3: mq_send4 returns errno %d\n",errno); exit(1); }
cprintf("Û");
 
if (mq_send(mq,"Oncle Scroodge",15,2)) // NB: different priority!!!
{ cprintf("T3: mq_send5 returns errno %d\n",errno); sys_end(); }
{ cprintf("T3: mq_send5 returns errno %d\n",errno); exit(1); }
cprintf("Û");
 
cprintf("T3: ending...\n");
/demos/trunk/servo/load.c
38,7 → 38,7
 
servo_close(COM2);
 
sys_end();
exit(0);
 
return 0;
 
/demos/trunk/servo/initfile.c
93,7 → 93,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);
}
 
}
145,8 → 145,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/input/input.c
60,7 → 60,7
 
void my_sysend(KEY_EVT *e)
{
sys_end();
exit(0);
}
 
void no_note(KEY_EVT *e)
428,7 → 428,7
pid = task_create("Key_Print", my_getch, &mp, NULL);
if (pid == NIL) {
sys_shutdown_message("Could not create task <Key_Print>\n");
sys_end();
exit(1);
} else
task_activate(pid);
 
442,7 → 442,7
pid = task_create("Joy_Print", my_getjoy, &mp, NULL);
if (pid == NIL) {
sys_shutdown_message("Could not create task <Joy_Print>\n");
sys_end();
exit(1);
} else
task_activate(pid);
}
/demos/trunk/input/initspk.c
103,8 → 103,6
 
device_drivers_close();
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
sys_abort_shutdown(0);
 
return NULL;
}
 
118,7 → 116,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);
}
 
}
/demos/trunk/input/joy.c
46,7 → 46,7
cprintf("(%6d %6d) %2x\n", a0, a1, btn);
task_endcycle();
if (btn == 0xF)
sys_end();
exit(1);
}
}
 
57,7 → 57,7
 
if (!JOY26_installed()) {
cprintf("No Joystick found.");
sys_end();
exit(1);
}
soft_task_default_model(mp);
soft_task_def_level(mp,2);
68,7 → 68,7
pid = task_create("Joy_Print", my_getjoy, &mp, NULL);
if (pid == NIL) {
sys_shutdown_message("Could not create task <Joy_Print>\n");
sys_end();
exit(1);
} else
task_activate(pid);
 
/demos/trunk/input/initfile.c
125,7 → 125,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);
}
}
 
165,7 → 165,7
JOY26_close();
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
210,7 → 210,5
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
}
/demos/trunk/input/speak.c
43,7 → 43,7
speaker_sound(0, 0);
kern_printf("S.Ha.R.K. closed.\n\n");
sys_end();
exit(0);
}
 
void no_note(KEY_EVT *e){
/demos/trunk/input/initjoy.c
96,8 → 96,6
 
device_drivers_close();
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
sys_abort_shutdown(0);
 
return NULL;
}
 
111,7 → 109,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);
}
 
}
/demos/trunk/input/key.c
40,7 → 40,7
void my_sysclose(KEY_EVT *e)
{
kern_printf("S.Ha.R.K. closed.\n\n");
sys_end();
exit(0);
}
 
TASK my_getch(void *arg) {
98,7 → 98,7
pid = task_create("Keyb_Print", my_getch, &mp, NULL);
if (pid == NIL) {
perror("Could not create task <Keyb_Print>");
sys_end();
exit(1);
} else
task_activate(pid);
 
/demos/trunk/input/mouse.c
43,7 → 43,7
{
mouse_txtcursor(DISABLE);
 
sys_end();
exit(0);
}
 
TASK my_putxy(void *arg) {
/demos/trunk/input/initkey.c
107,8 → 107,6
 
device_drivers_close();
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
sys_abort_shutdown(0);
 
return NULL;
}
 
124,7 → 122,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);
}
 
}
/demos/trunk/input/initcur.c
111,8 → 111,6
 
device_drivers_close();
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
sys_abort_shutdown(0);
 
return NULL;
}
 
126,7 → 124,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);
}
 
}
/demos/trunk/cpufreq/initfile.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(1);
}
 
}
178,8 → 178,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/cpufreq/cpufreq.c
39,7 → 39,7
 
void endfunc(KEY_EVT *e)
{
sys_end();
exit(0);
}
 
int main(int argc, char **argv)
/demos/trunk/mesatex/initfile.c
122,7 → 122,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);
}
 
}
149,7 → 149,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
193,8 → 193,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/mesatex/mesatex.c
256,7 → 256,7
OSMesaDestroyContext(ctx);
free(rgb_565_buf);
 
sys_end();
exit(0);
 
}
 
263,7 → 263,7
void program_key_end(KEY_EVT *k)
{
 
sys_end();
exit(0);
 
}
 
277,7 → 277,7
 
}
 
sys_end();
exit(0);
 
}
 
306,7 → 306,7
 
}
 
sys_end();
exit(0);
 
}
 
329,7 → 329,6
 
refresh_PID = task_create("refresh", refresh, &ht_refresh, NULL);
if (refresh_PID == -1) {
sys_end();
exit(4);
}
 
343,7 → 342,6
disegna_PID = task_create("disegna", disegna, &ht_disegna, NULL);
if (disegna_PID == -1) {
sys_end();
exit(4);
}
 
/demos/trunk/jumpball/rrn.c
18,11 → 18,11
 
/**
------------
CVS : $Id: rrn.c,v 1.5 2004-04-19 13:45:15 giacomo Exp $
CVS : $Id: rrn.c,v 1.6 2005-01-08 14:35:17 pj Exp $
 
File: $File$
Revision: $Revision: 1.5 $
Last update: $Date: 2004-04-19 13:45:15 $
Revision: $Revision: 1.6 $
Last update: $Date: 2005-01-08 14:35:17 $
------------
**/
 
131,7 → 131,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);
}
 
}
158,7 → 158,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
202,8 → 202,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/jumpball/rrp.c
18,11 → 18,11
 
/**
------------
CVS : $Id: rrp.c,v 1.5 2004-04-19 13:45:15 giacomo Exp $
CVS : $Id: rrp.c,v 1.6 2005-01-08 14:35:17 pj Exp $
 
File: $File$
Revision: $Revision: 1.5 $
Last update: $Date: 2004-04-19 13:45:15 $
Revision: $Revision: 1.6 $
Last update: $Date: 2005-01-08 14:35:17 $
------------
**/
 
131,7 → 131,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);
}
 
}
158,7 → 158,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
202,8 → 202,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/jumpball/demo.c
18,11 → 18,11
 
/**
------------
CVS : $Id: demo.c,v 1.7 2004-04-18 18:48:22 giacomo Exp $
CVS : $Id: demo.c,v 1.8 2005-01-08 14:35:17 pj Exp $
 
File: $File$
Revision: $Revision: 1.7 $
Last update: $Date: 2004-04-18 18:48:22 $
Revision: $Revision: 1.8 $
Last update: $Date: 2005-01-08 14:35:17 $
------------
**/
 
132,7 → 132,7
 
void endfun(KEY_EVT *k)
{
sys_end();
exit(0);
}
 
void zerofun(KEY_EVT *k)
/demos/trunk/jumpball/ern.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ern.c,v 1.5 2004-04-19 13:45:15 giacomo Exp $
CVS : $Id: ern.c,v 1.6 2005-01-08 14:35:17 pj Exp $
 
File: $File$
Revision: $Revision: 1.5 $
Last update: $Date: 2004-04-19 13:45:15 $
Revision: $Revision: 1.6 $
Last update: $Date: 2005-01-08 14:35:17 $
------------
**/
 
132,7 → 132,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);
}
 
}
159,7 → 159,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
203,8 → 203,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/jumpball/ecp.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ecp.c,v 1.5 2004-04-19 13:45:15 giacomo Exp $
CVS : $Id: ecp.c,v 1.6 2005-01-08 14:35:17 pj Exp $
 
File: $File$
Revision: $Revision: 1.5 $
Last update: $Date: 2004-04-19 13:45:15 $
Revision: $Revision: 1.6 $
Last update: $Date: 2005-01-08 14:35:17 $
------------
**/
 
129,7 → 129,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);
}
 
}
156,7 → 156,7
cprintf("Error: Cannot open graphical mode\n");
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
200,8 → 200,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/jumpball/jetctrl.c
18,11 → 18,11
 
/**
------------
CVS : $Id: jetctrl.c,v 1.4 2004-04-18 18:48:22 giacomo Exp $
CVS : $Id: jetctrl.c,v 1.5 2005-01-08 14:35:17 pj Exp $
 
File: $File$
Revision: $Revision: 1.4 $
Last update: $Date: 2004-04-18 18:48:22 $
Revision: $Revision: 1.5 $
Last update: $Date: 2005-01-08 14:35:17 $
------------
**/
 
202,7 → 202,7
if (p3 == -1) {
sys_shutdown_message("Could not create task <jetctrl> errno=%d",
errno);
sys_end();
exit(1);
}
 
soft_task_default_model(m4);
216,7 → 216,7
if (p4 == -1) {
sys_shutdown_message("Could not create task <jetdummy> errno=%d",
errno);
sys_end();
exit(1);
}
 
soft_task_default_model(m5);
230,7 → 230,7
if (p5 == -1) {
sys_shutdown_message("Could not create task <jetslide> errno=%d",
errno);
sys_end();
exit(1);
}
}
 
/demos/trunk/jumpball/ball.c
18,11 → 18,11
 
/**
------------
CVS : $Id: ball.c,v 1.6 2004-04-18 18:48:22 giacomo Exp $
CVS : $Id: ball.c,v 1.7 2005-01-08 14:35:17 pj Exp $
 
File: $File$
Revision: $Revision: 1.6 $
Last update: $Date: 2004-04-18 18:48:22 $
Revision: $Revision: 1.7 $
Last update: $Date: 2005-01-08 14:35:17 $
------------
**/
 
205,8 → 205,7
pid = task_create("pallaEDF", palla, &mp, NULL);
if (pid == NIL) {
sys_shutdown_message("Could not create task <pallaEDF>");
sys_end();
return;
exit(1);
}
else
task_activate(pid);
/demos/trunk/newtrace/instr/instr.c
76,7 → 76,7
p = task_create("Instr",ext_call,&m,NULL);
if (p == -1) {
sys_shutdown_message("Could not create task <instr> ...");
sys_end();
exit(1);
}
 
num++;
/demos/trunk/newtrace/instr/initfile.c
98,7 → 98,6
 
device_drivers_close();
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
sys_abort_shutdown(0);
 
return NULL;
}
115,7 → 114,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);
}
 
}
/demos/trunk/newtrace/initfile/initfile.c
138,7 → 138,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);
}
}
 
172,7 → 172,7
MOUSE26_close();
KEYB26_close();
INPUT26_close();
sys_end();
exit(1);
}
FB26_use_grx(FRAME_BUFFER_DEVICE);
223,7 → 223,5
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
}
/demos/trunk/newtrace/udp/initfile.c
108,8 → 108,6
 
device_drivers_close();
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
sys_abort_shutdown(0);
 
return NULL;
}
 
125,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);
}
 
}
/demos/trunk/advtimer/initfile.c
121,7 → 121,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);
}
 
}
179,8 → 179,6
 
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
 
sys_abort_shutdown(0);
 
return NULL;
 
}
/demos/trunk/advtimer/advtimer.c
169,7 → 169,7
 
void program_key_end(KEY_EVT* e)
{
sys_end();
exit(1);
}
 
void up_freq(KEY_EVT* e)
/demos/trunk/tftptest/initfile.c
108,7 → 108,6
 
device_drivers_close();
sys_shutdown_message("-- S.Ha.R.K. Closed --\n");
sys_abort_shutdown(0);
 
return NULL;
}
125,7 → 124,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);
}
 
}
/demos/trunk/tftptest/tftptest.c
28,7 → 28,7
{
sys_shutdown_message("Exit from the program...\n");
sys_shutdown_message("Ctrl-C pressed!\n");
sys_end();
exit(1);
}
 
void augprog(KEY_EVT *k)
136,8 → 136,7
cprintf("Net Init from %s to %s\n", LOCAL_HOST_IP, REMOTE_HOST_IP);
} else {
cprintf("Net Init Failed...\n");
sys_end();
return(err);
exit(1);
}
 
sem_init(&m1, 0, 1);
145,8 → 144,7
 
if ((handle = tftp_open("test.txt")) == -1) {
cprintf("No slots available. Program aborted...\n");
sys_end();
return(1);
exit(1);
}
 
cprintf("Ctrl-A to proceed *** Ctrl-C to stop\n");
157,8 → 155,7
 
if ((err = tftp_upload(handle, 4096, &m1)) != 0) {
cprintf("Error %d calling tftp_upload(). Program aborted...\n", err);
sys_end();
return(1);
exit(1);
}
 
/* First we set the sender's task properties...*/
168,13 → 165,11
 
if ((p1 = task_create("test_upload", test_upload, &hard_m, NULL)) == NIL) {
cprintf("Error creating test_upload task. Program aborted...\n");
sys_end();
return(1);
exit(1);
}
if (task_activate(p1) == -1) {
cprintf("Error activating test_upload task. Program aborted...\n");
sys_end();
return(1);
exit(1);
}
 
 
182,8 → 177,7
 
if ((handle2 = tftp_open("test2.txt")) == -1) {
cprintf("No second slot available. Program aborted...\n");
sys_end();
return(1);
exit(1);
}
 
 
192,8 → 186,7
 
if ((err = tftp_upload(handle2, 4096, &m2)) != 0) {
cprintf("Error %d calling tftp_upload(). Program aborted...\n", err);
sys_end();
return(1);
exit(1);
}
 
/* First we set the sender's task properties...*/
203,13 → 196,11
 
if ((p2 = task_create("test_upload2", test_upload2, &hard_m, NULL)) == NIL) {
cprintf("Error creating test_upload2 task. Program aborted...\n");
sys_end();
return(1);
exit(1);
}
if (task_activate(p2) == -1) {
cprintf("Error activating test_upload2 task. Program aborted...\n");
sys_end();
return(1);
exit(1);
}
 
 
220,7 → 211,8
tftp_close(handle2, TFTP_STOP_NOW);
 
cprintf("\nProgram terminated correctly.\n");
sys_end();
 
exit(0);
 
return(0);
}