Home/Support/Support Forum/get/set GPIO pins from different threads
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

get/set GPIO pins from different threads

+1 vote
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?
asked Sep 7, 2007 in NET+OS by compie Community Contributor (55 points)
recategorized Dec 18, 2013 by tuxembb

Please log in or register to answer this question.

1 Answer

+1 vote
I will answer my own question:
You need to use a mutex yourself. The code is not thread-safe.
answered Sep 19, 2007 by compie Community Contributor (55 points)
...