I am trying to compare a sample C ++ 11 code on a multi-core processor (Intel's i5 core). It is advisable to reduce context switching noise, process scheduling, etc. Thus, I want to acquire exclusive ownership of one core and disable any interruptions on it.
How to do this using the C ++ compiler and g ++?
In the document the benchmark code is used preempt_disable();, and raw_local_irq_save(flags);to achieve this goal. However, these two functions are associated with the headers of the Linux kernel, and the Linux kernel module for calling them is written in the document.
source
share