Is it safe to call NAgetGPIOpin(pin1) in thread 1 and NAsetGPIOpin(pin2) in thread 2 (at the same time)?
Or should I mutex protect all access to the NAget/setGPIOpin() functions?
Is it safe to call NAgetGPIOpin(pin1) in thread 1 and NAsetGPIOpin(pin2) in thread 2 (at the same time)?
Or should I mutex protect all access to the NAget/setGPIOpin() functions?
I will answer my own question:
You need to use a mutex yourself. The code is not thread-safe.