| 138 | #include <pthread.h> |
| 139 | |
| 140 | static void cpuid(unsigned leaf, unsigned subleaf, |
| 141 | unsigned *eax, unsigned *ebx, unsigned *ecx, unsigned *edx) { |
| 142 | __asm__("movq\t%%rbx,%%rsi\n\t" |
| 143 | "cpuid\n\t" |
| 144 | "xchgq\t%%rbx,%%rsi" |
| 145 | : "=a"(*eax), "=S"(*ebx), "=c"(*ecx), "=d"(*edx) |
| 146 | : "0"(leaf), "2"(subleaf)); |
| 147 | } |
| 148 | |
| 149 | static int pin_cpu(int cpu) { |
| 150 | cpu_set_t mask; |
no outgoing calls
no test coverage detected