2021-07-29 13:32:13 +02:00
|
|
|
Testing for multiple core support.
|
|
|
|
|
|
|
|
~~~
|
|
|
|
:core #8000 io:scan-for io:invoke ;
|
|
|
|
|
|
|
|
:core:init (n-) #0 core ;
|
|
|
|
:core:start (an-) #1 core ;
|
|
|
|
:core:pause (n-) #2 core ;
|
|
|
|
:core:pause-current #3 core ;
|
|
|
|
:core:resume (n-) #4 core ;
|
|
|
|
:core:rr (n-v) #5 core ;
|
|
|
|
:core:wr (vn-) #6 core ;
|
|
|
|
~~~
|
|
|
|
|
|
|
|
~~~
|
|
|
|
'Done var
|
|
|
|
|
2021-07-30 16:39:29 +02:00
|
|
|
:a [ @Done #100000 gt? [ core:pause-current ] if &Done v:inc $a c:put ] forever ;
|
2021-07-29 13:32:13 +02:00
|
|
|
:b [ $b c:put ] forever ;
|
|
|
|
:c [ $c c:put ] forever ;
|
2021-07-30 16:39:29 +02:00
|
|
|
:d [ @Done #50000 gt? [ core:pause-current ] if $d c:put ] forever ;
|
2021-07-29 13:32:13 +02:00
|
|
|
|
|
|
|
#1 core:init &a #1 core:start
|
|
|
|
#2 core:init &b #2 core:start
|
|
|
|
#3 core:init &c #3 core:start
|
|
|
|
#4 core:init &d #4 core:start
|
|
|
|
|
|
|
|
core:pause-current
|
|
|
|
~~~
|