* This function pins the currently executing thread onto the CPU Core with * the id given in the argument. * * \param id * The id of the core to pin the caller's thread to. */
| 89 | * The id of the core to pin the caller's thread to. |
| 90 | */ |
| 91 | static FORCE_INLINE |
| 92 | void pinThreadToCore(int id) { |
| 93 | cpu_set_t cpuset; |
| 94 | |
| 95 | CPU_ZERO(&cpuset); |
| 96 | CPU_SET(id, &cpuset); |
| 97 | assert(sched_setaffinity(0, sizeof(cpuset), &cpuset) == 0); |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Returns the cpu affinity mask of the currently executing thread. The type |
nothing calls this directly
no outgoing calls
no test coverage detected