I successfully adopt FreeRTOS since 2006 for many products in my company.
I’m currently use version 7.0.1 and cooperative mode: everthing is perfect for me with this configuration.
In the past days I received update notification for version 8.2.0 and I’ve tried and update ( I was very interested in some new features like direct notification and deferred interrupt handling).
Unfortunately I’ve immediately some issue with queque and semaphore management with the new 8.2.0 release.
Looking at change history I’ve seen that since revision 7.6.0, semaphores in cooperative mode changes a bit their behaviour and don’t include an automatical yield request when needed. ( in fact this is more correct in a cooperative configuration ).
Anyway in all my application I use them in this “old style” way used in releases since 7.6.0.
Now I’ve seen that If I switch to preemptive mode semaphores restarts to work fine for me, and my whole application seems to works.
So initially I thonugh that this could be the solution.
But now I’ve very concerned to switch to preemptive because of my code have no protection on data shared between different tasks: I’ve some task that quickly update a group of data and some other that read them.
I’ve neever had any case of data corruption in cooperative mode, but I’m not sure that this is the same with preemption, without adding additional protection on data access.
Have you some suggestion for me to solve this ???
In queue.c file definiton of queueYIELD_IF_USING_PREEMPTION() is null in coopetative mode.
What happen if I enable portYIELD_WITHIN_API() also for cooperative mode ???
I’ll recover the old style bevaviour or I’ve other side effects doing this ???
Someone could help me ??? Thank you in advance.