Quantcast
Channel: FreeRTOS locks and tasks - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by Richard for FreeRTOS locks and tasks

In your specific example where there is one reader and one writer (so not in the "general" case, and definitely not in the case where there are multiple writers) then I would suggest a lock is not need...

View Article



Answer by fluter for FreeRTOS locks and tasks

You need use locks to synchronize concurrent access to shared objects, the easiest scenario would be like:lock_t l; // defines a lock of your system// thread 1:lock(l);counter += 1;unlock(l);// thread...

View Article

Answer by unwind for FreeRTOS locks and tasks

Yes, you should use locks to protect access to the shared resource.You can't be sure that the sequence generated by the compiler to read the shared variable is atomic, so it might be unsafe.If you want...

View Article

FreeRTOS locks and tasks

When should I use locks using freertos on something like cortex-m3? It seems to be clear using multicore systems but what about single core?For example I have two tasks. In first I increment variable...

View Article
Browsing latest articles
Browse All 4 View Live


Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>
<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596344.js" async> </script>