home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
EFFO
/
pd6.lzh
/
TST
/
semaphores.tst
< prev
next >
Wrap
Text File
|
1989-12-23
|
734b
|
56 lines
.( Loading Multi-tasking test...) cr
#include multi_tasking.f83
.( *** start of multi-tasking demo ***) cr
multi-tasking
0 SEMAPHORE synch
100 100 task.type TASK-1
task.body
." ** t1 waiting **" cr
synch wait
." ** t1 terminated **" cr
task.end
.( ** t1 scheduled **) cr
TASK-1 t1
who
100 100 task.type TASK-2
task.body
20 0 do
100 delay who
loop
." ** t2 terminated **" cr
task.end
.( ** t2 scheduled **) cr
TASK-2 t2
who
100 100 task.type TASK-3
task.body
1000 delay
." ** t3 signaling ** " cr
synch signal
." ** t3 waiting for t2 **" cr
t2 join who
." ** t3 terminated **" cr
task.end
.( ** t3 scheduled **) cr
TASK-3 t3
who
.( ** main waiting for t3 **) cr
who
t3 join
who
forth only