lancaster-university / codal-stm32

MIT License
1 stars 3 forks source link

Make nested disable/enable_irq work #3

Closed mmoskal closed 5 years ago

mmoskal commented 5 years ago

@jamesadevine @finneyj what do you think?

jamesadevine commented 5 years ago

It looks good to me. I think we do want this behaviour as often there are multiple critical paths coinciding (for instance with the Timer).

What's your motivating use case Michal, similar to the timer code above?

mmoskal commented 5 years ago

DMESG() disables interrupts, so you cannot use it to log inside of critical section (which normally you shouldn't, but sometimes you want temporarily).

mmoskal commented 5 years ago

Also, I think we should do this for all codal targets - this is much less error prone than the current solution.

jamesadevine commented 5 years ago

Agree!