X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/1025235c72c31f7fa7b648c0e32ddcaa68a8f66a..a136ca38d83fae60994a54f5da88120e545895e1:/lunaix-os/LConfig diff --git a/lunaix-os/LConfig b/lunaix-os/LConfig index 3d0a179..36be155 100644 --- a/lunaix-os/LConfig +++ b/lunaix-os/LConfig @@ -1,7 +1,8 @@ import time -include("kernel/LConfig") -include("arch/LConfig") +include("kernel") +include("arch") +include("hal") @Term("Version") @ReadOnly @@ -13,7 +14,7 @@ def lunaix_ver(): type(str) seq_num = int(time.time() / 3600) - default("dev-2024_%d"%(seq_num)) + default("%s dev-2024_%d"%(v(arch), seq_num)) @Collection def debug_and_testing(): @@ -29,4 +30,39 @@ def debug_and_testing(): extermly unstable """ type(bool) - default(False) \ No newline at end of file + default(False) + + @Term("Report on stalled thread") + def check_stall(): + """ + Check and report on any thread that spend too much time in kernel. + """ + + type(bool) + default(True) + + @Term("Max kernel time allowance") + def stall_timeout(): + """ + Set the maximum time (in seconds) spent in kernel before considered + to be stalled. + """ + + type(int) + default(10) + + return v(check_stall) + + @Term("Max number of preemptions") + def stall_max_preempts(): + """ + Set the maximum number of preemptions that a task can take + before it is considered to be stucked in some loops. + + Setting it to 0 disable this check + """ + + type(int) + default(0) + + return v(check_stall) \ No newline at end of file