In C2000, certain registers are protected by EALLOW. Doesn't code that uses EALLOW require resource locking? If there is no resource locking, it seems like EALLOW-protected register writes could fail in the following scenario where there are two threads that each perform EALLOW, EALLOW-protected register write, then EDIS, but are ordered as follow:
1) thread 1 EALLOW
2) thread 2 EALLOW,
3) thread 2 EALLOW-protected register write
4) thread 2 EDIS
5) thread 1 EALLOW-protected register write
6) thread 1 EDIS would cause the thread 1 EALLOW-protected register write to fail.
In this scenario, #5 thread 1 EALLOW-protected register write would fail because EALLOW was disabled by #4 thread 2 EDIS. Resource locking would prevent this scenario. However, I have not encountered EALLOW resource locking in sample/library code or mentioned in documentation.
-Joseph