Hi All,
I've been porting atomThreads for use on an MSP430X but I have some concerns regarding the CRITICAL sections. Currently I've copied what has been done in the existing ports where the global interrupt flag is disabled and reinstated where necessary. It seems that there are some large chunks of code and in quite a few places that are encompassed by the CRITICAL_START and CRITICAL_STOP macros. This is a concern as it means that any interrupts that come in could have a potentially unacceptable delay before they are processed (interrupt latency). >From what I can tell the CRITICAL sections are to protect the moving of the TCBs from one queue to the next. Is there a better way of protecting this or designing out the issue of protection? My current thoughts are to change the CRITICAL_START and CRITICAL_STOP to only mask the scheduler timer interrupt therefore allowing the other interrupts to be processed, can you see a problem with this? But I'm also hoping to find a better solution that requires even less interrupt downtime. Best regards Mathew