I want to measure the runtime of a c-code segment using Linux. I take one timestamp at the beginning of the code segment and one at the end. But I do not know how to protect the code from IRQ interruptions and context switches to high tasks. The program works in user space! The code segment is short, so don't panic bypassing the system.
Does anyone know an easy solution for this kind of protection?
source
share