/demos/trunk/bca/initfile.c |
---|
18,7 → 18,7 |
* http://shark.sssup.it |
*/ |
/* CVS : $Id: initfile.c,v 1.2 2002-10-01 10:33:51 pj Exp $ */ |
/* CVS : $Id: initfile.c,v 1.3 2002-11-11 08:15:13 pj Exp $ */ |
/* |
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it> |
62,6 → 62,8 |
#include "modules/cbs.h" |
#include "modules/rr.h" |
#include "modules/dummy.h" |
#include "modules/pi.h" |
#include "modules/nop.h" |
#include "modules/sem.h" |
#include "modules/hartport.h" |
#include "modules/cabs.h" |
/demos/trunk/bca/bca_lib.c |
---|
18,7 → 18,7 |
* http://shark.sssup.it |
*/ |
/* CVS : $Id: bca_lib.c,v 1.2 2002-10-01 10:33:51 pj Exp $ */ |
/* CVS : $Id: bca_lib.c,v 1.3 2002-11-11 08:15:13 pj Exp $ */ |
/* |
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it> |
61,7 → 61,7 |
// *** Librerie BCA *** |
#include"bca.h" |
extern char * titolo[10]={" UNIVERSITA' DEGLI \0", |
char * titolo[10]={" UNIVERSITA' DEGLI \0", |
" STUDI DI \0", |
" PAVIA \0", |
"Progetto S.Ha.R.K.\0", |
/demos/trunk/bca/esplo.c |
---|
18,7 → 18,7 |
* http://shark.sssup.it |
*/ |
/* CVS : $Id: esplo.c,v 1.1 2002-10-01 10:25:00 pj Exp $ */ |
/* CVS : $Id: esplo.c,v 1.2 2002-11-11 08:15:13 pj Exp $ */ |
/* |
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it> |
64,7 → 64,11 |
int i; |
int index; |
WORD xx0, yy0, xx1, yy1; |
struct timespec delay; |
delay.tv_sec = (ESPLO_PERIOD-ESPLO_MET)/1000000; |
delay.tv_nsec = ((ESPLO_PERIOD-ESPLO_MET)%1000000)*1000; |
i=0; |
index = (int)argv; |
xx0 = aereo_table[index].x - ESPLO_LX/2; |
79,7 → 83,7 |
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); |
task_delay(ESPLO_PERIOD-ESPLO_MET); |
nanosleep(&delay, NULL); |
} |
mutex_lock(&grx_mutex); |
/demos/trunk/bca/bca.c |
---|
18,7 → 18,7 |
* http://shark.sssup.it |
*/ |
/* CVS : $Id: bca.c,v 1.2 2002-10-01 10:33:51 pj Exp $ */ |
/* CVS : $Id: bca.c,v 1.3 2002-11-11 08:15:13 pj Exp $ */ |
/* |
* Copyright (C) 2000 Fabio Calabrese <fabiocalabrese77@yahoo.it> |
132,7 → 132,7 |
kern_cli(); |
ll_gettime(TIME_EXACT, &t), |
kern_printf("\nS.Ha.R.K. Exception raised!!!" |
"\nTime (s:ns) :%d:%d" |
"\nTime (s:ns) :%ld:%ld" |
"\nException number:%d" |
"\nPID :%d\n", |
t.tv_sec, t.tv_nsec, info->si_value.sival_int, |
/demos/trunk/eli/eli.c |
---|
18,11 → 18,11 |
/** |
------------ |
CVS : $Id: eli.c,v 1.1.1.1 2002-09-02 09:37:45 pj Exp $ |
CVS : $Id: eli.c,v 1.2 2002-11-11 08:18:26 pj Exp $ |
File: $File$ |
Revision: $Revision: 1.1.1.1 $ |
Last update: $Date: 2002-09-02 09:37:45 $ |
Revision: $Revision: 1.2 $ |
Last update: $Date: 2002-11-11 08:18:26 $ |
------------ |
This file is similar to the configuration of Hartik 3.3.1 |
50,6 → 50,7 |
#include "eli.h" |
#include <time.h> |
//######################################## |
// Definizione variabili globali |
121,7 → 122,13 |
} |
TASK pulisci(int i) |
{ int x,y,dim; |
{ |
int x,y,dim; |
struct timespec delay; |
delay.tv_sec=0; |
delay.tv_nsec=3000000; |
while (1) |
{ |
139,7 → 146,7 |
} |
task_delay(3000); |
nanosleep(&delay, NULL); |
PULISCI(x,y,dim); |
sem_post(&pu); |
/demos/trunk/fsdemo/xread.c |
---|
204,8 → 204,11 |
nv=n; |
n=filledspace(ptr)/objsize; |
if (n==0) { |
struct timespec delay; |
delay.tv_sec=0; |
delay.tv_nsec=15000000; |
n=nv; |
task_delay(15000); |
nanosleep(&delay, 0); |
goto REDO; |
return 0; |
} |
/demos/trunk/fsdemo/mplay.c |
---|
36,11 → 36,11 |
*/ |
/* |
* CVS : $Id: mplay.c,v 1.1.1.1 2002-09-02 09:37:41 pj Exp $ |
* CVS : $Id: mplay.c,v 1.2 2002-11-11 08:17:31 pj Exp $ |
* |
* File: $File$ |
* Revision: $Revision: 1.1.1.1 $ |
* Last update: $Date: 2002-09-02 09:37:41 $ |
* Revision: $Revision: 1.2 $ |
* Last update: $Date: 2002-11-11 08:17:31 $ |
*/ |
#include "config.h" |
66,6 → 66,7 |
#include <stdlib.h> |
#include <stdio.h> |
#include <time.h> |
#include "gclock.h" |
#include "gvideo.h" |
365,6 → 366,13 |
if (grp>0) group_activate(grp); |
esc=0; |
{ |
struct timespec delay; |
delay.tv_sec = MAINSLEEP/1000000; |
delay.tv_nsec = (MAINSLEEP%1000000)*1000; |
while (!esc) { |
if (keyb_getcode(&k,NON_BLOCK)) { |
if(k.ascii==13) esc=1; |
372,8 → 380,9 |
else if (k.ascii=='s') task_activate(ph2); |
else if (k.ascii=='d') task_activate(ph3); |
} |
task_delay(MAINSLEEP); |
nanosleep(&delay, NULL); |
} |
} |
#ifndef NOGRX |
grx_close(); |