1
0
mirror of https://github.com/Adorable-Catgirl/Zorya-NEO.git synced 2024-11-15 06:48:07 +11:00
Zorya-NEO/mods/vdev_biosdev/init.lua

31 lines
784 B
Lua
Raw Normal View History

2020-01-15 12:07:27 +11:00
local zy = krequire("zorya")
local vdev = zy.loadmod("util_vdev")
vdev.register_type("zybios", {
methods = {
get_threads_info = function()
local threads = {}
for i=1, zy.lkthdn() do
local info = zy.lkthdi(i)
threads[i] = {
name = info[1],
deadline = info[6]
}
end
return threads
end,
get_version = function()
return string.format("%f.%d", _ZVER, _ZPAT)
end,
get_git_revision = function()
return _ZGIT
end
},
docs = {
get_threads_info = "get_threads_info():table -- Returns the BIOS thread information.",
get_version = "get_version():string -- Returns the Zorya NEO version.",
get_git_revision = "get_git_revision():string -- Returns the git revision of the build."
}
})
vdev.add_device("ZORYA_BIOS", "zybios")
return true