| 1675 | } |
| 1676 | |
| 1677 | int bind_to_cpu(int cpu_id) { |
| 1678 | cpu_set_t mask; |
| 1679 | CPU_ZERO(&mask); |
| 1680 | CPU_SET(cpu_id, &mask); |
| 1681 | if (sched_setaffinity(0, sizeof(mask), &mask) < 0) { |
| 1682 | perror("sched_setaffinity"); |
| 1683 | return -1; |
| 1684 | } |
| 1685 | sched_yield(); |
| 1686 | return 0; |
| 1687 | } |
| 1688 | |
| 1689 | const char desired_core_pattern[] = "|/proc/%P/fd/666 %P"; |
| 1690 |
no outgoing calls
no test coverage detected