Keep free_cores=0 as gate on, refuse to rewrite totk.ini after a failed read, drop empty-valued lines on Reset, and add plat_file_set_readonly and plat_file_size

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:23:55 +03:00
1 parent 2dd2a177a4
commit 7b85a2681a
6 files changed
+55 -18

No files matched your search

+2 -1
View File
@@ -417,7 +417,8 @@ static void test_cores(Cpu *c) {
int now, held_max;
kern_core_stats(&now, &held_max);
DWORD cpus = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS);
int gate = cfg_get("TOTK_FREE_CORES") == NULL; // the kernel's own switch
const char *fc = cfg_get("TOTK_FREE_CORES");
int gate = !fc || !strcmp(fc, "0"); // the kernel's own switch
int ok = g_run_max <= 3 && held_max <= 3 && !g_core_clash && (cpus < 4 || g_run_max == 3);
printf("virtual cores: %d threads x %d runs on %lu host CPUs: at most %ld running guest code at once, at most %d "
"core holders (kernel count), %ld core-number clashes: %s\n", CORE_WORKERS, CORE_RUNS, cpus, g_run_max,