title: Matlab/Simulink/EmbeddedCoder shared data synchronization
body: <p>I would like to discuss Matlab/Simulink/EmbeddedCoder from data synchronization point of view. What I found is the impossibility to use interrupt disable operation in order to protect the shared data. Actually, when it comes to data synchronization, there are 2 approaches:</p>
  
  <ol>
  <li><p>use Simulink RateTransition block - in this case, if the ISR has to do modifications on the shared data, it's kind of impossible to store it, especially in the case when the interrupt occurs unpredictable times between two consecutive executions of a periodic task.</p></li>
  <li><p>use VxWorks vxlib1 library and especially TaskSync is able to handle this issue, however, in generated code it adds an extra task, uses semaphores.. it comes to be a complicated system
  In many cases, the second solution is even not possible, since many simple systems use simplified OSs, that even do no support semaphores. Even if it is not the case, in my understanding, simple locking of the system(DI) would do a great job!</p></li>
  </ol>
  
  <p>There is a variation of 2. and this is the possibility to change VxWorks vxlib1. This is allowed and completely fine, but having this common feature there should be simple, off the shelf solution, right?</p>
  
  <p>Do you have any other experience handling this issue? Is it possible just disable the interrupts? Is it possible to generate a code for shared data without any protection?
  I will be happy to hear about your experience!</p>