尽快推进:收紧tooldata mmap shim源码锚点

This commit is contained in:
cnc
2026-06-05 09:33:08 +08:00
parent 3c72356c92
commit 9b9e942dd6
2 changed files with 79 additions and 0 deletions

View File

@@ -51,6 +51,17 @@ source-link/shim guard only; it must not add CNC behavior and must not expand th
`tooldata_db_notify()` must return `0` without side effects while `db_live`
is false.
## Mmap Backend Boundaries
- `core/wasm_shims/tooldata/tooldata_mmap_backend.cc` must preserve the
LinuxCNC `tooldata_mmap.cc` export surface for the mmap creator/user/close lifecycle while using an in-memory replacement for native mmap.
- The mmap backend must keep the LinuxCNC random-toolchanger flag and
`last_index` initialization edges from `tool_mmap_creator()`, and
`tooldata_last_index_get()` must preserve the last-index unavailable return.
- `tool_mmap_user()` must keep LinuxCNC's unavailable mmap failure boundary,
and `tool_mmap_close()` must clear the browser-safe in-memory state without
adding filesystem mmap behavior.
## Boundaries
- Tool table files referenced by switchkins INI files are source coverage only;