Results 1 to 1 of 1

Thread: Locking all threads to one processor

  1. #1
    Join Date
    Apr 2007
    Location
    United States
    Posts
    17
    Thanks
    2
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Question Locking all threads to one processor

    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:
    1. 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().
    Last edited by chuckshaw; 3rd July 2007 at 19:37. Reason: found answer

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.