APPENDIX
.
[Install directory]
I Operations of Sample Programs
Figure Bb shows the sample program listings.
The behaviors of samples 1 and 2 are slightly different. This is because, while the serial driver in
sample 1 is implemented based on interruption, the one in sample 2 is implemented based on
polling. The remainder of this appendix applies mainly to sample 1 whose operation is more
difficult to understand than sample 2.
Higher priority
38
smpsys
907
rtos
knl
bin
lib
rcf
smpdrv
syslib
Task a_tsk(void)
{
While(1) {
cwai_flg(FLG_1) ;
printf("%s,a_msg) ;
}
}
Lower priority
Task b_tsk(void)
{
While(1) {
printf("%s",b_msg) ;
set_flg(FLG_1) ;
}
}
Figure Bb Sample Programs
smp1
smp2
smp1.wsp
smp2.wsp
*
Flag waiting
Event flag ID = 1
Initial pattern
value 0
Flag set
Storage directory for
Sample system1
Storage directory for
Sample system2
Sample1 work space file
Sample2 work space file