6

I need to control CPU affinity for all the pthreads in my process. Some pthreads are created by third-party libraries. Is there a way to enumerate the pthread_t of all existing pthreads in the process so that I can call pthread_setaffinity_np() on them?

Joshua Chia
  • 1,760
  • 2
  • 16
  • 27
  • How portable does it have to be ? – cnicutar Dec 08 '12 at 16:41
  • 4
    your question seems to be a duplicate of this: http://stackoverflow.com/questions/3475750/posix-api-call-to-list-all-the-pthreads-running-in-a-process – Bug Killer Dec 08 '12 at 20:40
  • 1
    Possible duplicate of [POSIX API call to list all the pthreads running in a process](https://stackoverflow.com/questions/3475750/posix-api-call-to-list-all-the-pthreads-running-in-a-process) – ArturFH Jun 13 '17 at 15:09

0 Answers0