Project

General

Profile

Support #17756

Add a MOOC mutex for serializing internals

Added by Richard Neswold about 3 years ago. Updated almost 2 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
MOOC Framework
Target version:
Start date:
09/20/2017
Due date:
% Done:

0%

Estimated time:
Duration:

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 and taskLock/taskUnlock instances should be converted to semTake/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 over 2 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 almost 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.



Also available in: Atom PDF