I have made a C program under gcc using wiringPi, which is working well.
I want tp try multi threading to improve performance of certain part of my code.
I'm not clear about the piLock / piUnLock functions.
To quote from the wiringPi reference page,
Code: Select all
piLock (int keyNum) ; piUnlock (int keyNum) ;
So does this mean I can have only 4 (0 to 3) shared variables between my 'main' and all another threads ?
How to handle more shared variables ?
Can anyone shed some light ?