I have a cross platform app that we need to lock all threads to a single processor because of a shared library we are required to use.
In windows we do this by calling :
Qt Code:
SetProcessAffinityMask(GetCurrentProcess(), 1);To copy to clipboard, switch view to plain text mode
Does anyone know how I could perform the same action in linux?
Thanks,
Chuck
UPDATE:
well i think i found an answer with sched_setaffinity().
Bookmarks