Re: UART is dropping bytes :(
Posted: Sun Jun 22, 2014 6:26 pm
In dbg_check_enter_isr we have two comparisons, OR and increment. Because it is OR (and not AND), it looks like the comparisons do not have to be inside the critical section - cannot the critical section be reduced to just the increment?
On the other hand there is probably not much sense in that since I've tried the lock-free safe_increment/safe_decrement and it did not change the benchmark at all. I guess port_lock_from_isr & port_unlock_from_isr are pretty cheap operations.
I am still trying to figure out which operations are expensive and which ones are cheap.
On the other hand there is probably not much sense in that since I've tried the lock-free safe_increment/safe_decrement and it did not change the benchmark at all. I guess port_lock_from_isr & port_unlock_from_isr are pretty cheap operations.
I am still trying to figure out which operations are expensive and which ones are cheap.