prevent linux thread from being interrupted by scheduler

Posted by johnnycrash on Stack Overflow See other posts from Stack Overflow or by johnnycrash
Published on 2010-04-07T20:36:01Z Indexed on 2010/04/07 20:43 UTC
Read the original article Hit count: 188

Filed under:
|
|

How do you tell the thread scheduler in linux to not interrupt your thread for any reason? I am programming in user mode. Does simply locking a mutex acomplish this? I want to prevent other threads in my process from being scheduled when a certain function is executing. They would block and I would be wasting cpu cycles with context switches. I want any thread executing the function to be able to finish executing without interruption even if the threads' timeslice is exceeded.

© Stack Overflow or respective owner

Related posts about linux

Related posts about threads