Possible duplicate:
How to set the proximity of a processor to a specific pthread?
I am writing a C ++ program using the g ++ compiler in Ubuntu. I have 4 threads in my program and 4 cores on my processor. I want to be sure that each thread will be running on a different core. I am rarely familiar with pthread.
c ++ multithreading pthreads
Saeed
source share