interplane.Get Omega
Read in your language

omega-mv

Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.

Brought by drakestapleton

branch main Branches Tags History

omega-mv / seed / host / affinity / caller-conductor.om

27 lines · 354 bytes Raw Blame History
1om2
2fn main to int
3m = new uchar 128 0
4n = cpuget 0 m 0 128
5if le n 0
6ret 81
7end
8count = ulong 0
9for i ulong 128
10for j ulong 8
11if ne and get m i shl uchar 1 uchar j 0
12count = add count 1
13end
14end
15end
16if ne count 1
17ret 82
18end
19core = ulong cpunow
20if eq and get m div core 8 shl uchar 1 uchar rem core 8 0
21ret 83
22end
23if ne getprio 0 0 1
24ret 84
25end
26ret 0
27end