设备创新后台
Go to file
Huamonarch 9bb810d9ed Replace broken ColdMutex with dual-layer ShmSpinLock + std::mutex
The old ColdMutex (interprocess_mutex) was in process-local anonymous
namespace storage, so each process had its own copy — no actual
cross-process exclusion. Even if moved to SHM, interprocess_mutex is
not robust: a crash while holding the lock would deadlock on restart.

New design:
- ShmSpinLock: atomic<pid_t> in shared memory, kill(pid,0) detects
  dead owners (ESRCH → takeover), crash-safe by construction
- std::mutex: process-local, handles intra-process thread contention
  without burning CPU on the SHM spinlock
- DualLock: locks local first, then shm; unlocks in reverse

9 lock sites in MapRuleStat upgraded to std::lock_guard<DualLock>.
2026-05-13 10:21:55 +08:00
.vscode Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00
cmake_include Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00
config Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00
dsm Add READMEs for RICS, eqpm, dsm and update eqpalg README with corrections 2026-05-09 11:46:17 +08:00
eqpalg Remove rm -rf of MapRuleStat_boost.mmap on startup 2026-05-13 09:47:52 +08:00
eqpm Add READMEs for RICS, eqpm, dsm and update eqpalg README with corrections 2026-05-09 11:46:17 +08:00
inc Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00
mix_cc Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00
py Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00
RICS Add READMEs for RICS, eqpm, dsm and update eqpalg README with corrections 2026-05-09 11:46:17 +08:00
script/table Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00
shm Replace broken ColdMutex with dual-layer ShmSpinLock + std::mutex 2026-05-13 10:21:55 +08:00
src Add READMEs for all infrastructure services and overall project 2026-05-09 12:13:00 +08:00
TestProject Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00
third_party Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00
.gitignore Initial commit: EIS C++ project with multi-process code 2026-05-09 11:23:45 +08:00
EIS_README.md Add READMEs for all infrastructure services and overall project 2026-05-09 12:13:00 +08:00