X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/baca54322c66983205edecd2ebb00d997878be50..270869139db617e29a35bb9ded41087bb702f9ac:/lunaix-os/LConfig?ds=sidebyside diff --git a/lunaix-os/LConfig b/lunaix-os/LConfig index fef1221..36be155 100644 --- a/lunaix-os/LConfig +++ b/lunaix-os/LConfig @@ -30,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