| 431 | #define N 1000 |
| 432 | |
| 433 | static void |
| 434 | comp_smp_tsc(void *arg) |
| 435 | { |
| 436 | uint64_t *tsc; |
| 437 | int64_t d1, d2; |
| 438 | u_int cpu = PCPU_GET(cpuid); |
| 439 | u_int i, j, size; |
| 440 | |
| 441 | size = (mp_maxid + 1) * 3; |
| 442 | for (i = 0, tsc = arg; i < N; i++, tsc += size) |
| 443 | CPU_FOREACH(j) { |
| 444 | if (j == cpu) |
| 445 | continue; |
| 446 | d1 = tsc[cpu * 3 + 1] - tsc[j * 3]; |
| 447 | d2 = tsc[cpu * 3 + 2] - tsc[j * 3 + 1]; |
| 448 | if (d1 <= 0 || d2 <= 0) { |
| 449 | smp_tsc = 0; |
| 450 | return; |
| 451 | } |
| 452 | } |
| 453 | } |
| 454 | |
| 455 | static void |
| 456 | adj_smp_tsc(void *arg) |
nothing calls this directly
no test coverage detected