0dc7b9ee46
This function always returns the same value for a given thread. Add the const attribute to it so the compiler won't call it over and over needlessly each time _current is referenced, making for far more efficient code. The __attribute_const__ symbol is used to mimic the Linux equivalent. We want to make it clear that this is distinct from the const keyword. Fix the test_x86_cpu_scrubs_regs where the compiler wasn't told that a bunch of registers are being clobbered as highlighted by this change. Signed-off-by: Nicolas Pitre <npitre@baylibre.com> |
||
---|---|---|
.. | ||
cpu_scrubs_regs | ||
info | ||
nmi | ||
pagetables | ||
static_idt |