/advdemos/trunk/gpsmesa/gpsmesa.c |
---|
532,7 → 532,7 |
} |
sys_end(); |
exit(1); |
} |
/*This task reads the data from the gps transmitter using the polling system. |
549,7 → 549,7 |
task_endcycle(); |
} |
sys_end(); |
exit(1); |
} |
556,7 → 556,7 |
//is called just before program ends |
void program_key_end(KEY_EVT *k) |
{ |
sys_end(); |
exit(1); |
} |
//is called when t key is pressed and changes the texture to be displayed on the sphere |
619,7 → 619,7 |
draw_PID = task_create("draw", draw, &ht_draw, NULL); |
if (draw_PID == -1) { |
sys_end(); |
exit(1); |
return 0; |
} |
633,7 → 633,7 |
gps_PID = task_create("gps", gps, &ht_gps, NULL); |
if (gps_PID == -1) { |
sys_end(); |
exit(1); |
return 0; |
} |
/advdemos/trunk/gpsmesa/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; |
} |
/advdemos/trunk/mesaref/mesaref.c |
---|
87,7 → 87,7 |
FILE *fp = fopen(file_name, "rb"); |
if (!fp) { |
cprintf("[read_png_file] File %s could not be opened for reading\n", file_name); |
sys_end(); |
exit(1); |
} |
fread(header, 1, 8, fp); |
214,7 → 214,7 |
ImgFormat = GL_RGB; |
else { |
cprintf("Texture Load Falied !!\n"); |
sys_end(); |
exit(1); |
} |
make_table(); |
378,12 → 378,12 |
/* graphic card Initialization */ |
if (grx_init() < 1) { |
sys_abort(1); |
exit(1); |
} |
if (grx_open(640, 480, 16) < 0) { |
cprintf("GRX Err\n"); |
sys_abort(1); |
exit(1); |
} |
video_buf = (unsigned char *)flbaddr; |
400,7 → 400,7 |
grx_close(); |
sys_end(); |
exit(1); |
} |
407,7 → 407,7 |
void program_key_end(KEY_EVT *k) |
{ |
sys_end(); |
exit(1); |
} |
421,7 → 421,7 |
} |
sys_end(); |
exit(1); |
} |
451,7 → 451,7 |
} |
sys_end(); |
exit(1); |
} |
474,7 → 474,6 |
refresh_PID = task_create("refresh", refresh, &ht_refresh, NULL); |
if (refresh_PID == -1) { |
sys_end(); |
exit(4); |
} |
488,7 → 487,6 |
disegna_PID = task_create("disegna", disegna, &ht_disegna, NULL); |
if (disegna_PID == -1) { |
sys_end(); |
exit(4); |
} |
506,7 → 504,7 |
if (screen()) { |
printk(KERN_INFO "Graphical initialization failed !!\n"); |
sys_end(); |
exit(1); |
} |
group_activate(1); |
/advdemos/trunk/mesaref/initfile.c |
---|
36,11 → 36,11 |
*/ |
/* |
* CVS : $Id: initfile.c,v 1.1.1.1 2004-05-24 17:54:50 giacomo Exp $ |
* CVS : $Id: initfile.c,v 1.2 2005-01-08 15:14:32 pj Exp $ |
* |
* File: $File$ |
* Revision: $Revision: 1.1.1.1 $ |
* Last update: $Date: 2004-05-24 17:54:50 $ |
* Revision: $Revision: 1.2 $ |
* Last update: $Date: 2005-01-08 15:14:32 $ |
*/ |
#include "kernel/kern.h" |
112,7 → 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(); |
exit(1); |
return -1; |
} |
/advdemos/trunk/mesaref/readme.txt |
---|
48,5 → 48,5 |
copy_videomem_16to16 links these buffers |
- If the texture load fails, sys_end() is called |
- If the texture load fails, exit(1) is called |
/advdemos/trunk/elastic/initfile.c |
---|
119,7 → 119,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); |
} |
} |
171,8 → 171,6 |
sys_shutdown_message("-- S.Ha.R.K. Closed --\n"); |
sys_abort_shutdown(0); |
return NULL; |
} |
/advdemos/trunk/elastic/elastic.c |
---|
272,7 → 272,7 |
} while (!quit); |
sys_end(); |
exit(1); |
return 0; |
/advdemos/trunk/chimera/initfile.c |
---|
103,7 → 103,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); |
} |
} |
161,8 → 161,6 |
sys_shutdown_message("-- S.Ha.R.K. Closed --\n"); |
sys_abort_shutdown(0); |
return NULL; |
} |
/advdemos/trunk/chimera/calibrate.c |
---|
166,7 → 166,7 |
st_pid = task_create("Calibration task",calibrate,&st,NULL); |
if (st_pid == NIL) { |
cprintf("Error creating calibration task\n"); |
sys_end(); |
exit(1); |
} |
task_activate(st_pid); |
/advdemos/trunk/chimera/chimera.c |
---|
31,7 → 31,7 |
kern_printf("Task Name : %s - Max Time : %d\n", proc_table[i].name, (int)tmp); |
} |
sys_end(); |
exit(1); |
} |
251,7 → 251,7 |
pid_walk = task_create("Walk_Task", walk_auto_3, &ms, NULL); |
if (pid_walk == NIL) { |
perror("Could not create task <Walk_Auto>"); |
sys_end(); |
exit(1); |
} else |
task_activate(pid_walk); |
} |
/advdemos/trunk/chimera/send.c |
---|
268,7 → 268,7 |
servo_pid = task_create("Servo_Task", servo_send, &ms, NULL); |
if (servo_pid == NIL) { |
perror("Could not create task <Send_Task>"); |
sys_end(); |
exit(1); |
} else |
task_activate(servo_pid); |
280,7 → 280,7 |
if (init_serial()) { |
perror("Could not initialize serial port."); |
sys_end(); |
exit(1); |
} |
for (i=0; i<6;i++) { |
/advdemos/trunk/block/common.c |
---|
37,7 → 37,7 |
void ctrlc_exit(KEY_EVT *k) |
{ |
cprintf("CTRL-C pressed!\n"); |
sys_end(); |
exit(1); |
} |
/* -- */ |
/advdemos/trunk/mpeg2/jetctrl.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: jetctrl.c,v 1.1.1.1 2004-05-24 17:54:50 giacomo Exp $ |
CVS : $Id: jetctrl.c,v 1.2 2005-01-08 15:14:32 pj Exp $ |
File: $File$ |
Revision: $Revision: 1.1.1.1 $ |
Last update: $Date: 2004-05-24 17:54:50 $ |
Revision: $Revision: 1.2 $ |
Last update: $Date: 2005-01-08 15:14:32 $ |
------------ |
**/ |
156,7 → 156,7 |
if (p4 == -1) { |
grx_close(); |
perror("Could not create task <jetdummy>"); |
sys_end(); |
exit(1); |
} |
task_activate(p4); |
} |
/advdemos/trunk/mpeg2/initfile.c |
---|
36,11 → 36,11 |
*/ |
/* |
* CVS : $Id: initfile.c,v 1.2 2004-06-01 11:54:11 giacomo Exp $ |
* CVS : $Id: initfile.c,v 1.3 2005-01-08 15:14:32 pj Exp $ |
* |
* File: $File$ |
* Revision: $Revision: 1.2 $ |
* Last update: $Date: 2004-06-01 11:54:11 $ |
* Revision: $Revision: 1.3 $ |
* Last update: $Date: 2005-01-08 15:14:32 $ |
*/ |
#include "kernel/kern.h" |
171,7 → 171,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(); |
exit(1); |
return -1; |
} |
229,7 → 229,7 |
grx_close(); |
#endif |
cprintf("CTRL-C pressed!\n"); |
sys_end(); |
exit(1); |
} |
/advdemos/trunk/mpeg2/spatscal.c |
---|
94,7 → 94,7 |
printf("reading %s\n",fname); |
#endif |
fd=fopen(fname,"rb"); |
if (fd==NULL) sys_abort(-1); // PJ exit(-1); |
if (fd==NULL) exit(-1); |
for (j=0; j<lh; j++) { |
for (i=0; i<lw; i++) |
llframe0[comp][lw*j+i]=getc(fd); |
125,7 → 125,7 |
printf("reading %s\n",fname); |
#endif |
fd=fopen(fname,"rb"); |
if (fd==NULL) sys_abort(-1); // PJ exit(-1); |
if (fd==NULL) PJ exit(-1); |
for (j=0; j<lh; j+=lower_layer_progressive_frame?1:2) |
for (i=0; i<lw; i++) |
llframe0[comp][lw*j+i]=getc(fd); |
139,7 → 139,7 |
printf("reading %s\n",fname); |
#endif |
fd=fopen(fname,"rb"); |
if (fd==NULL) sys_abort(-1); // PJ exit(-1); |
if (fd==NULL) PJ exit(-1); |
for (j=1; j<lh; j+=2) |
for (i=0; i<lw; i++) |
llframe1[comp][lw*j+i]=getc(fd); |
/advdemos/trunk/mpeg2/store.c |
---|
389,13 → 389,13 |
f = (struct framebuf_struct *)malloc(sizeof(struct framebuf_struct)); |
if (!f) { |
cputs("Not enough memory!!!\n"); |
sys_end(); |
exit(1); |
} |
f->f = (WORD *)malloc(framebuf_sz); |
if (!f->f) { |
cputs("Not enough memory for buffer!!!\n"); |
sys_end(); |
exit(1); |
} |
f->next = framebuf_free; |
495,7 → 495,7 |
f = framebuf_first; |
if (!f) |
sys_abort(69); // should never happen |
exit(69); // should never happen |
framebuf_first = framebuf_first->next; |
/advdemos/trunk/rtw/control.c |
---|
56,7 → 56,7 |
CONTROL_pid = task_create("CONTROL",CONTROL_body,&CONTROL_task,NULL); |
if (CONTROL_pid == NIL) { |
cprintf("Error: Cannot create RealTime Workshop [CONTROL] Task\n"); |
sys_end(); |
exit(1); |
} |
task_activate(CONTROL_pid); |
/advdemos/trunk/rtw/actuators.c |
---|
51,7 → 51,7 |
ACTUATOR_pid = task_create("ACTUATOR0",ACTUATOR_body,&ACTUATOR_task,NULL); |
if (ACTUATOR_pid == NIL) { |
cprintf("Error: Cannot create RealTime Workshop [ACTUATOR0] Task\n"); |
sys_end(); |
exit(1); |
} |
task_activate(ACTUATOR_pid); |
/advdemos/trunk/rtw/rtw.c |
---|
206,7 → 206,7 |
break; |
default: |
cprintf("Error: Unable to initialize rtInf, rtMinusInf and rtNaN\n"); |
sys_end(); |
exit(1); |
break; |
} |
292,7 → 292,7 |
if (rtmGetErrorStatus(S) != NULL) { |
cprintf("Error: Model registration: %s\n", |
rtmGetErrorStatus(S)); |
sys_end(); |
exit(1); |
} |
if (finaltime >= 0.0 || finaltime == RUN_FOREVER) rtmSetTFinal(S,finaltime); |
312,7 → 312,7 |
if (status != NULL) { |
cprintf("Error: Failed to initialize sample time engine: %s\n", status); |
sys_end(); |
exit(1); |
} |
rt_CreateIntegrationData(S); |
350,17 → 350,17 |
if (GBLbuf.errmsg) { |
cprintf("Error: %s\n",GBLbuf.errmsg); |
sys_end(); |
exit(1); |
} |
if (GBLbuf.isrOverrun) { |
cprintf("Error: %s: ISR overrun - base sampling rate is too fast\n",QUOTE(MODEL)); |
sys_end(); |
exit(1); |
} |
if (rtmGetErrorStatus(S) != NULL) { |
cprintf("Error: %s\n", rtmGetErrorStatus(S)); |
sys_end(); |
exit(1); |
} |
MdlTerminate(); |
537,7 → 537,7 |
RTW_pid = task_create("RTW",RTW_body,&RTW_task,NULL); |
if (RTW_pid == NIL) { |
cprintf("Error: Cannot create RealTime Workshop [RTW] Task\n"); |
sys_end(); |
exit(1); |
} |
hard_task_default_model(OUTPUT_task); |
549,7 → 549,7 |
OUTPUT_pid = task_create("OUTPUT",OUTPUT_body,&OUTPUT_task,NULL); |
if (OUTPUT_pid == NIL) { |
cprintf("Error: Cannot create RealTime Workshop [OUTPUT] Task\n"); |
sys_end(); |
exit(1); |
} |
hard_task_def_mit(OUTPUT_task,OUTPUT_period); |
558,7 → 558,7 |
OUTPUT_w_pid = task_create("OUTPUTW",OUTPUT_w_body,&OUTPUT_task,NULL); |
if (OUTPUT_pid == NIL) { |
cprintf("Error: Cannot create RealTime Workshop [OUTPUTW] Task\n"); |
sys_end(); |
exit(1); |
} |
task_activate(RTW_pid); |
578,7 → 578,7 |
Close_RealTime_Workshop(); |
sys_end(); |
exit(1); |
return 0; |
/advdemos/trunk/rtw/sensors.c |
---|
50,7 → 50,7 |
DISTANCE_pid = task_create("DISTANCE",SENSOR_body,&SENSOR_task,NULL); |
if (DISTANCE_pid == NIL) { |
cprintf("Error: Cannot create RealTime Workshop [DISTACE] Task\n"); |
sys_end(); |
exit(1); |
} |
hard_task_def_arg(SENSOR_task,(void *)(1)); |
57,7 → 57,7 |
ANGLE_pid = task_create("ANGLE",SENSOR_body,&SENSOR_task,NULL); |
if (DISTANCE_pid == NIL) { |
cprintf("Error: Cannot create RealTime Workshop [DISTACE] Task\n"); |
sys_end(); |
exit(1); |
} |
hard_task_def_arg(SENSOR_task,(void *)(2)); |
64,7 → 64,7 |
CURVE_pid = task_create("CURVE",SENSOR_body,&SENSOR_task,NULL); |
if (CURVE_pid == NIL) { |
cprintf("Error: Cannot create RealTime Workshop [CURVE] Task\n"); |
sys_end(); |
exit(1); |
} |
hard_task_def_arg(SENSOR_task,(void *)(3)); |
71,7 → 71,7 |
WR_pid = task_create("WR",SENSOR_body,&SENSOR_task,NULL); |
if (WR_pid == NIL) { |
cprintf("Error: Cannot create RealTime Workshop [WR] Task\n"); |
sys_end(); |
exit(1); |
} |
hard_task_def_arg(SENSOR_task,(void *)(4)); |
78,7 → 78,7 |
WL_pid = task_create("CURVE",SENSOR_body,&SENSOR_task,NULL); |
if (WR_pid == NIL) { |
cprintf("Error: Cannot create RealTime Workshop [WL] Task\n"); |
sys_end(); |
exit(1); |
} |
task_activate(DISTANCE_pid); |
/advdemos/trunk/makefile |
---|
0,0 → 1,28 |
include ../shark.cfg |
ifeq ($(findstring NEW,$(TRACER)) , NEW) |
TRC = newtrace |
endif |
dirs := $(filter-out CVS cvs makefile readme.txt newtrace README.TXT, $(wildcard *)) |
dirs += $(TRC) |
p_all := $(addprefix prefixall_, $(dirs)) |
p_install := $(addprefix prefixinstall_, $(dirs)) |
p_clean := $(addprefix prefixclean_, $(dirs)) |
pcleanall := $(addprefix prefixcleanall_, $(dirs)) |
pdepend := $(addprefix prefixdepend_, $(dirs)) |
.PHONY: all clean |
all: $(p_all) |
clean: $(p_clean) |
prefixall_%: |
make -C $* |
prefixclean_%: |
make -C $* clean |
/advdemos/trunk/fsf/test1.c |
---|
257,7 → 257,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); |
266,7 → 266,7 |
t2 = task_create("Y", edftask, &mhard, NULL); |
if (t2 == NIL) { |
perror("Could not create task Y ..."); |
sys_end(); |
exit(1); |
} |
group_activate(1); |
344,7 → 344,7 |
} while(ch != ESC); |
sys_end(); |
exit(1); |
return 0; |
/advdemos/trunk/fsf/test2.c |
---|
53,7 → 53,7 |
void program_key_end(KEY_EVT *k) |
{ |
sys_end(); |
exit(1); |
} |
246,12 → 246,12 |
// 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(1); |
} |
layout_screen(); |
295,7 → 295,7 |
} |
sys_end(); |
exit(1); |
return 0; |
/advdemos/trunk/fsf/test3.c |
---|
288,7 → 288,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,30000); //5% |
297,7 → 297,7 |
t2 = task_create("Y", edftask, &mhard, NULL); |
if (t2 == NIL) { |
perror("Could not create task Y ..."); |
sys_end(); |
exit(1); |
} |
group_activate(1); |
341,7 → 341,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); |
err = fsf_create_thread(server1,&j1,NULL,star,NULL,&nrt); |
kern_printf("(%d)",err); |