Question on task scheduling in Linux

So I need some help understanding this: Lets say I have a C program on Linux that creates 3 threads of equal priority. At some point during execution, one of the threads A needs to execute a special function without getting interrupted by B or C (critical section within A). How can this be done? Can scheduling of A, B and C (I assume it is round robin) be disabled from within A? Or is is better to increase A's priority? I am guessing disabling interrupts does not make sense on Linux. Please, any help,

Reply to
bhoot.jolokia
Loading thread data ...

Mutex

-Michael

Reply to
Michael Schnell

I am not sure if a mutex is sufficient or efficient enough in all cases.. I want to create the same effect as if interrupts were disabled (which would disable scheduling)

Reply to
bhoot.jolokia

If system calls like "Mutex" are not fast enough (regarding guaranteed latency) for you, you will not get along with a Linux user land program anyway. Linux is not realtime !

-Michael

Reply to
Michael Schnell

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.