Keep every default in the settings table: cfg_value, cfg_int, cfg_double and cfg_bool read it, and the consumers of table keys drop their own defaults

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Valiantsin DzerakhandClaude Opus 5.5 committed 2026-10-26 09:32:30 +03:00
1 parent 7b85a2681a
commit 8b514f6ead
25 files changed
+164 -102

No files matched your search

+4 -5
View File
@@ -266,8 +266,7 @@ static void ap_init(void);
static int cores_enabled(void) {
if (g_cores_on < 0) {
const char *fc = cfg_get("TOTK_FREE_CORES");
g_cores_on = fc && strcmp(fc, "0") ? 0 : 1; // "0" keeps the gate, like unset
g_cores_on = !cfg_bool("TOTK_FREE_CORES"); // "0" keeps the gate, like unset
diag_init();
ap_init();
}
@@ -308,9 +307,9 @@ void kern_ap_stub(void);
static void ap_init(void) {
if (g_ap >= 0) return;
const char *e = cfg_get("TOTK_ASYNC_PREEMPT");
g_ap = !(e && !strcmp(e, "0"));
g_ap_int = g_ap && !(e && !strcmp(e, "2"));
const char *e = cfg_value("TOTK_ASYNC_PREEMPT");
g_ap = strcmp(e, "0") != 0;
g_ap_int = g_ap && strcmp(e, "2") != 0;
if (g_ap) {
RtModule m[16];
int n = rt_linked_modules(m, 16);