Forum Discussion
Altera_Forum
Honored Contributor
21 years agoAtomic Instruction Block
Is there a faster way to make a critical block of instructions atomic (not interruptible) than using the alt_irq_disable_all and alt_irq_enable_all HAL functions? Chris
Altera_Forum
Honored Contributor
21 years agoIf you find a more efficient way then I'd be interested to hear it.
At optimisation level -O2 these functions compile up into exactly the same code as described above:rdctl rx, status
wrctl status, zero at the start and wrctl status, rx at the end (where rx is a register between r2 and r23 chosen by the compiler). Please check your objdump file to see what the compiler has generated for you.