Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 1119 → Rev 1118

/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.2 2002-11-11 08:20:44 pj Exp $
* CVS : $Id: aster2.c,v 1.1 2002-10-28 08:13:37 pj Exp $
 
this is a part of the classic Hartik demo Aster.
 
120,8 → 120,7
if (p == -1)
{
if (x < 500 && errno != ENO_AVAIL_TASK) x += 1;
printf_xy(62,3,WHITE,"adapt=%3u err=%d",
iq_query_first(&freedesc),errno);
printf_xy(62,3,WHITE,"adapt=%3u err=%d",freedesc,errno);
}
else {
num_aster++;
/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.2 2002-11-11 08:20:44 pj Exp $
* CVS : $Id: aster3.c,v 1.1 2002-10-28 08:13:37 pj Exp $
 
Test Number 10 (A):
 
161,8 → 161,7
if (p == -1)
{
if (x < 500 && errno != ENO_AVAIL_TASK) x += 1;
printf_xy(62,3,WHITE,"adapt=%3u err=%d",
iq_query_first(&freedesc),errno);
printf_xy(62,3,WHITE,"adapt=%3u err=%d",freedesc,errno);
}
else {
num_aster++;
/demos/trunk/base/readme
2,49 → 2,24
How to make a Shark application.
 
Text mode demos:
- hello.c --> a hello world application
- timer.c --> tests if the time reads are always increasing
(useful for debugging purposes)
- sig.c --> simple example that sends signals
- semdemo.c --> simple example that uses a semaphore for mutual exclusion
- pidemo.c --> simple example that uses PI mutexes between NRT and Hard tasks
- pcdemo.c --> simple example that uses PC mutexes between NRT and Hard tasks
- srpdemo.c --> simple example that uses SRP mutexes between NRT and Hard tasks
- mdemo.c --> simple example that uses a mutex, initialized with whatever
protocol you want ;-)
- aster.c --> Wow! the original Hartik ASTER demo!!! (EDF, CABs, ...)
- aster1.c --> a -lot- of periodic tasks that are created and then die
(6 seconds demo)
- aster2.c --> a simple stress test: a lot of tasks are created until Utot=1;
uses jet functions to dump statistics. (60 seconds demo)
- aster3.c --> aster2 + 8 tasks handled by 2 different TBS servers
- aster4.c --> aster3 + CBS tasks + Shutdown demo with system tasks
- aster5.c --> aster3 + only CBS tasks + mutexes... Really interesting!
- aster6.c --> aster5 + Polling Server to serve the JetCtrl task
- aster7.c --> another aster clone with Rate monotonic and Polling server
- aster8.c --> aster5 + Sporadic Server
- preempt.c --> simple test for CBS, task_preempt, task_nopreempt, and
save/skip arrivals
- pcidemo.c --> PCI Bus scan
- talk.c --> UDP Unix Talk clone (useful to understand the network driver)
- mousfind.c--> Simple text mouse protocol finder
- jointest.c--> Simple test that uses the task_join primitive
- condtest.c--> Simple test that uses condition variables
- intsem.c --> Simple test that uses internal semaphores
- keycode.c --> Prints Keyboard Keycodes on the screen
- memtest.c --> Do you need to use malloc, kern_alloc & co?
- hello.c --> a hello world application
- timer.c --> tests if the time reads are always increasing
(useful for debugging purposes)
- sig.c --> simple example that sends signals
- aster1.c --> a -lot- of periodic tasks that are created and then die
(6 seconds demo)
- aster2.c --> a simple stress test: a lot of tasks are created until Utot=1;
uses jet functions to dump statistics. (60 seconds demo)
- aster3.c --> aster2 + 8 tasks handled by 2 different TBS servers
 
Graphical demos:
- fly.c --> Random flies going around the screen
- ego.c --> Periodic tasks that writes a phrease on the screen
- cabs.c --> Example that uses cabs
- sched.c --> Scheduling example (mouse, EDF, RM, DS, PS, TBS)
- fly.c --> Random flies going around the screen
- ego.c --> Periodic tasks that writes a phrease on the screen
- cabs.c --> Example that uses cabs
 
 
Note on the init files:
- ihello.c (RR+dummy)
- isemdemo.c (iaster1+Semaphores)
- iaster1.c (EDF+RR+dummy)
- iaster3.c (EDF+RR+TBS(0.1)+TBS(0.3)+dummy)
- iaster4.c (iaster3+CBS)
- initfile.c (EDF+CBS+RR+dummy, SEMaphores, CABS, HARTPORTs and Keyboard)
- isched.c (Configurable scheduling architecture)
/demos/trunk/base/sig.c
18,11 → 18,11
 
/**
------------
CVS : $Id: sig.c,v 1.2 2002-11-11 08:20:44 pj Exp $
CVS : $Id: sig.c,v 1.1 2002-10-28 08:13:37 pj Exp $
 
File: $File$
Revision: $Revision: 1.2 $
Last update: $Date: 2002-11-11 08:20:44 $
Revision: $Revision: 1.1 $
Last update: $Date: 2002-10-28 08:13:37 $
------------
**/
 
115,7 → 115,7
}
 
action.sa_flags = 0;
action.sa_handler = (void (*)(int))catchit;
action.sa_handler = catchit;
 
if (sigaction(SIGILL, &action, NULL) == -1) {
perror("Error using sigaction.");
/demos/trunk/base/makefile
7,11 → 7,7
endif
include $(BASE)/config/config.mk
 
PROGS = hello sig time preempt
PROGS += aster aster1 aster2 aster3 aster4 aster5 aster6 aster7 aster8
PROGS += pcidemo talk mousfind keycode memtest
PROGS += jointest condtest intsem semdemo pidemo pcdemo srpdemo mdemo
PROGS += ego fly cabs sched
PROGS= ego fly cabs hello sig aster1 aster2 aster3 time
 
include $(BASE)/config/example.mk
 
26,27 → 22,6
sig:
make -f $(SUBMAKE) APP=sig INIT= OTHEROBJS="ihello.o" OTHERINCL=
 
preempt:
make -f $(SUBMAKE) APP=preempt INIT= OTHEROBJS="initfile.o" OTHERINCL=
 
semdemo:
make -f $(SUBMAKE) APP=semdemo INIT= OTHEROBJS="isemdemo.o" OTHERINCL=
 
pidemo:
make -f $(SUBMAKE) APP=pidemo INIT= OTHEROBJS="imdemo.o" OTHERINCL=
 
pcdemo:
make -f $(SUBMAKE) APP=pcdemo INIT= OTHEROBJS="imdemo.o" OTHERINCL=
 
srpdemo:
make -f $(SUBMAKE) APP=srpdemo INIT= OTHEROBJS="imdemo.o" OTHERINCL=
 
mdemo:
make -f $(SUBMAKE) APP=mdemo INIT= OTHEROBJS="imdemo.o" OTHERINCL=
 
aster:
make -f $(SUBMAKE) APP=aster INIT= OTHEROBJS="initfile.o" OTHERINCL=
 
aster1:
make -f $(SUBMAKE) APP=aster1 INIT= OTHEROBJS="iaster1.o" OTHERINCL=
 
56,45 → 31,6
aster3:
make -f $(SUBMAKE) APP=aster3 INIT= OTHEROBJS="iaster3.o" OTHERINCL=
 
aster4:
make -f $(SUBMAKE) APP=aster4 INIT= OTHEROBJS="iaster4.o" OTHERINCL=
 
aster5:
make -f $(SUBMAKE) APP=aster5 INIT= OTHEROBJS="imdemo.o" OTHERINCL=
 
aster6:
make -f $(SUBMAKE) APP=aster6 INIT= OTHEROBJS="iaster6.o" OTHERINCL=
 
aster7:
make -f $(SUBMAKE) APP=aster7 INIT= OTHEROBJS="iaster7.o" OTHERINCL=
 
aster8:
make -f $(SUBMAKE) APP=aster8 INIT= OTHEROBJS="iaster8.o" OTHERINCL=
 
pcidemo:
make -f $(SUBMAKE) APP=pcidemo INIT= OTHEROBJS="initfile.o" OTHERINCL=
 
talk:
make -f $(SUBMAKE) APP=talk INIT= OTHEROBJS="initfile.o" OTHERINCL=
 
mousfind:
make -f $(SUBMAKE) APP=mousfind INIT= OTHEROBJS="initfile.o" OTHERINCL=
 
jointest:
make -f $(SUBMAKE) APP=jointest INIT= OTHEROBJS="imdemo.o" OTHERINCL=
 
condtest:
make -f $(SUBMAKE) APP=condtest INIT= OTHEROBJS="imdemo.o" OTHERINCL=
 
intsem:
make -f $(SUBMAKE) APP=intsem INIT= OTHEROBJS="imdemo.o" OTHERINCL=
 
keycode:
make -f $(SUBMAKE) APP=keycode INIT= OTHEROBJS="initfile.o" OTHERINCL=
 
memtest:
make -f $(SUBMAKE) APP=memtest INIT= OTHEROBJS="initfile.o" OTHERINCL=
 
# Graphical applications
 
ego:
106,5 → 42,3
cabs:
make -f $(SUBMAKE) APP=cabs INIT= OTHEROBJS="initfile.o" OTHERINCL=
 
sched:
make -f $(SUBMAKE) APP=sched INIT= OTHEROBJS="isched.o" OTHERINCL=