Edit: None of this is important info, better detail with stack traces down below
I'm assuming there's no implicit pointer indirection in TinyGo? I haven't dug that far into the compiler side of things yet, but as I've been testing out the multi-core functionality with a project I'm working on it's causing issues with sync.Mutex. Since the standard approach with sync.Mutex relies on implicit pointer indirection on the Lock/Unlock methods they're rendered useless and result in double-unlock panics in the case a function gets preempted while the mutex is locked:
> panic: sync: unlock of unlocked Mutex
I've worked around it in my code by just making all my mutexes explicitly pointer variables, but this one in particular is biting me while setting up two ADC channels in quick succession:
var adcLock sync.Mutex
Edit: None of this is important info, better detail with stack traces down below
I'm assuming there's no implicit pointer indirection in TinyGo? I haven't dug that far into the compiler side of things yet, but as I've been testing out the multi-core functionality with a project I'm working on it's causing issues with sync.Mutex. Since the standard approach with sync.Mutex relies on implicit pointer indirection on the Lock/Unlock methods they're rendered useless and result in double-unlock panics in the case a function gets preempted while the mutex is locked:> panic: sync: unlock of unlocked MutexI've worked around it in my code by just making all my mutexes explicitly pointer variables, but this one in particular is biting me while setting up two ADC channels in quick succession:var adcLock sync.Mutextinygo/src/machine/machine_rp2_adc.go
Line 15 in 0ec1cb1