Skip to content

Commit bd59abe

Browse files
committed
chore(quanuX): clean up pending sentinel assembly changes and untracked binaries
1 parent 62440c0 commit bd59abe

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,5 @@ client/desktop/tauri-app/src-tauri/src/*.bak.*
127127
*.zst
128128
*.duckdb
129129
*.duckdb.wal
130+
QuanuX-Sentinel/cpp/src/chaos_test
131+
tests/survivability/warm_restart_test

QuanuX-Sentinel/cpp/src/sentinel.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,11 @@ class BareMetalSentinel {
142142
[[gnu::always_inline]] inline void trigger_interlock() {
143143
// The "Homer" Insight: Instead of a standard std::atomic store instruction
144144
// which may invoke a full `xchg` or heavier cache line flush, we utilize
145-
// the specific x86 `LOCK BTS` (Bit Test and Set) instruction. This sets the
146-
// 0th bit directly across the bus without invalidating or looping if it's
147-
// already set. ABSOLUTELY NO std::cout OR SYSCALLS PERMITTED IN THIS SCOPE.
145+
// the specific x86 `LOCK OR` instruction on the byte (`orb $1`). This sets
146+
// the 0th bit directly across the bus natively. ABSOLUTELY NO std::cout OR
147+
// SYSCALLS PERMITTED IN THIS SCOPE.
148148
uint8_t *ptr = reinterpret_cast<uint8_t *>(&state_->risk_interlock);
149-
__asm__ volatile("lock btsb $0, %0" : "+m"(*ptr) : : "memory", "cc");
149+
__asm__ volatile("lock orb $1, %0" : "+m"(*ptr) : : "memory", "cc");
150150
}
151151
};
152152

0 commit comments

Comments
 (0)