Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何以编程方式获取给定线程正在运行的核心?类似于 Unix 的getcpuid. 这适用于 Linux 和 C。
getcpuid
sched_getcpu ()不会为内核提供不同的值吗?