Skip to content

Commit b9387fe

Browse files
mikesmittydeadprogram
authored andcommitted
fix(rp2): use side-effect-free spinlocks
1 parent 3dce224 commit b9387fe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/runtime/runtime_rp2.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@ func coreStackTop(core uint32) uintptr {
291291

292292
// These spinlocks are needed by the runtime.
293293
var (
294-
printLock = spinLock{id: 0}
295-
schedulerLock = spinLock{id: 1}
296-
atomicsLock = spinLock{id: 2}
297-
futexLock = spinLock{id: 3}
294+
printLock = spinLock{id: 20}
295+
schedulerLock = spinLock{id: 21}
296+
atomicsLock = spinLock{id: 22}
297+
futexLock = spinLock{id: 23}
298298
)
299299

300300
// A hardware spinlock, one of the 32 spinlocks defined in the SIO peripheral.

0 commit comments

Comments
 (0)