Two threads, one counter count: 0
shared memorycount = 0
🧡 T1 read +1 write πŸ”’ lock reg: β€”
🧡 T2 read +1 write πŸ”’ lock reg: β€”
🧡 T1 idle πŸ”‘ A free πŸ”‘ B free 🧡 T2 idle holds wants holds wants
πŸ’€ DEADLOCK
shared resource🍽 free
🐷Hog A served: 0
🐷Hog B served: 0
πŸ™‚Polite waited: 0
count++ is three steps, not one
Click β–Ά Interleave to run two threads one micro-step at a time.
β–Έ A race passes 99 test runs and fails in production β€” the bug is the timing, not the code you can see.