From 871a7d4e1743dc91c177e531b6f0d2c8e6971227 Mon Sep 17 00:00:00 2001 From: ionut Date: Wed, 29 Apr 2026 23:21:28 +0300 Subject: [PATCH] fixed a heisenbug and reset openos --- data/openos/boot/89_rc.lua | 1 + data/openos/usr/misc/greetings.txt | 2 +- src/machine.lua | 4 ++-- src/main.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/data/openos/boot/89_rc.lua b/data/openos/boot/89_rc.lua index fb44408..941a0e6 100644 --- a/data/openos/boot/89_rc.lua +++ b/data/openos/boot/89_rc.lua @@ -7,3 +7,4 @@ require("event").listen("init", function() dofile(require("shell").resolve("rc", "lua")) return false end) + diff --git a/data/openos/usr/misc/greetings.txt b/data/openos/usr/misc/greetings.txt index e645e68..134a583 100644 --- a/data/openos/usr/misc/greetings.txt +++ b/data/openos/usr/misc/greetings.txt @@ -16,7 +16,7 @@ Most blocks act as 'cables' - use relays and power distributors to create separa Welcome to the dark side - here, have some cookies. Screens can display Unicode - paste the special chars or use unicode.char. Run `help` or `man programname` for ingame help on programs shipped with OpenOS - start with `man man`. -For more help, there's a wiki at http://ocdoc.cil.li/ - or find the IRC loot disk and join #oc. +For more help, there's a wiki at https://ocdoc.cil.li/ - or find the IRC loot disk and join #oc. Computers have a very basic, built-in speaker - control it using computer.beep(). Many component methods have a short documentation - use `=component.componentName.methodName` in the Lua interpreter to see it. You can get a list of all attached components using the `components` program. diff --git a/src/machine.lua b/src/machine.lua index 45befaf..5d8c992 100644 --- a/src/machine.lua +++ b/src/machine.lua @@ -7,7 +7,7 @@ os.exit = nil os.execute = nil -local sysyieldobj = {} +local sysyieldobj = "__SYSYIELD__" local coroutine = coroutine local function sysyield() @@ -88,7 +88,7 @@ function component.invoke(address, method, ...) else -- must sync syncedMethodStats = {address, method, ...} - coroutine.yield() + sysyield() local rets = syncedMethodStats syncedMethodStats = nil return table.unpack(rets) diff --git a/src/main.c b/src/main.c index 66c9b87..61ba006 100644 --- a/src/main.c +++ b/src/main.c @@ -484,7 +484,7 @@ int main(int argc, char **argv) { nn_mountComponent(c, eepromCard, 0, false); nn_mountComponent(c, managedfs, 1, false); nn_mountComponent(c, gpuCard, 2, false); - nn_mountComponent(c, testingfs, 3, false); + //nn_mountComponent(c, testingfs, 3, false); nn_mountComponent(c, testDrive, 4, false); nn_mountComponent(c, testFlash, 5, false); while(true) {