nobody wrote on Wednesday, September 20, 2006:
Forgive me for what may be a very poor question. Maybe I just need to write this out… This is related to my work on the AT91SAM7S256 port of FreeRTOS (using WinARM to compile).
How is ulCriticalNesting supposed to work? I think that what I am seeing is that whenever a task is created, vPortEnterCritical() is called which increments ulCriticalNesting (initially it is 9999UL so now it would be 10000UL). When the creation of the task is complete then it calls vPortExitCritical() and first checks to see if ulCriticalNesting is greater than 0. It is. Then it decrements ulCriticalNesting (back to 9999UL in this case) and checks if ulCriticalNesting is equal to 0. It is NOT. Since it is NOT, then it does NOT enable the interrupts.
Am I not understanding this code correctly? How will ulCriticalNesting ever allow for the interrupts to be enabled again?