Closed Frityet closed 1 year ago
io
and os
are userspace things, aren't they?
io
andos
are userspace things, aren't they?
yeah, I go over that in the post, its just io.read()
, io.write()
, os.exit()
and os.time()
which can be done in kernel space and is useful. But, the use of lua in kernel space will be minimal anyways so its a low priority issue
Some math
functions being implemented in #28
os.time() can't be, because to synchronize you need to do ntp or something
os.time() can't be, because to synchronize you need to do ntp or something
not even with the CMOS battery?
What if there is no CMOS RTC, or the rtc needs to be offset by something that the userspace knows but kernel doesn't (like iirc on qcom, and definitely on the ps4 for example)?
is not having RTC, or having to offset, actually common?
on x86, not really. on arm, i think its pretty common, yeah. and either way, we probably want an rtc driver in lua because you dont /need/ to have it in c /anyway/
on x86, not really. on arm, i think its pretty common, yeah. and either way, we probably want an rtc driver in lua because you dont /need/ to have it in c /anyway/
yeah makes sense
Currently, the
io
andos
tables are not implemented (nil
). The file handling functions inio
cannot be implemented, but the console parts (io.read
,io.write
, etc) can be implemented and specificallyio.read
andio.write
already are implemented askernel.read
,kernel.write
. Foros
, all of the functions may be discarded for now, except the time related functions which values may be accessed by theCMOS
, andos.exit()
.