Support #17756
Add a MOOC mutex for serializing internals
0%
Description
Early MOOC authors used intLock
/intUnlock
and taskLock
/taskUnlock
as quick-n-dirty ways to provide serialization. These primitives add latency to interrupts and context switches, respectively. It's inappropriate affecting other tasks and interrupts because someone was too lazy to properly serialize the data structures. To close this issue, we need:
- A global MOOC mutex to provide atomic changes to MOOC internals.
- All
intLock
/intUnlock
andtaskLock
/taskUnlock
instances should be converted tosemTake
/semGive
calls. - Bonus points for finding and fixing other areas that weren't properly protected1.
It should be noted that MOOC drivers can have a mutex associated with their instance, so care must be taken to ensure there's no possibility of deadlock in using these mutexes.
1 For instance, the multiple RETDAT tasks transfer packets to the RETDAT reply task and there's some slop in there because we couldn't guarantee things were happening atomically. This can now be fixed.
History
#1 Updated by Richard Neswold almost 3 years ago
- Status changed from New to Assigned
- Assignee set to Richard Neswold
I'll take a crack at this issue.
#2 Updated by Richard Neswold over 2 years ago
- Target version changed from MOOC v4.8 to MOOC v5.0
Push to next version.
#3 Updated by Richard Neswold about 2 years ago
- Category set to MOOC Framework
- Status changed from Assigned to New
- Assignee deleted (
Richard Neswold)
I've already started enough other issues. I'll free this one up for someone else.