misc runtime patch #103
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#103
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "pca006132/artiq-zynq:runtime"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
@ -17,1 +18,4 @@
core0_tx = CHANNEL_0TO1.lock().take();
// prevent deadlock...
// the compiler optimized this routine so fast that it would deadlock
for _ in 0..100 {
Are 100 nops actually needed? Why not 1?
I just add the nops randomly, perhaps a smaller number would do.
If the problem is a compiler optimization, a single nop (without a for loop) should do, no?
The problem is not compiler optimization, we were having a race condition, and the compiler optimization just make it occur consistently. This fix would not fix the race condition, but provide better chance for core1 to get the mutex. In theory it can still deadlock, but very unlikely.