omega-mcp
aien-dev/omega-mcp
Brought by drakestapleton
omega-mcp / data / examples / sched.om
| 1 | note CPU affinity, the current CPU and the thread's scheduling priority (nice 19 is always allowed) |
| 2 | global mask uchar 128 |
| 3 | fn ck yes bool to void |
| 4 | if not yes |
| 5 | exit 80 |
| 6 | end |
| 7 | end |
| 8 | fn main to int |
| 9 | n = cpuget 0 mask 0 128 |
| 10 | ck gt n 0 |
| 11 | ck eq cpuset 0 mask 0 ulong n 0 |
| 12 | ck ge cpunow 0 |
| 13 | ck eq setprio 0 0 19 0 |
| 14 | ck eq getprio 0 0 1 |
| 15 | ret 0 |
| 16 | end |