C Posix thread scheduler
Im not sure if this is the right forum for this post so if not feel free to move it for me.
I am trying to write a custom thread scheduler for Posix being compiled in cygwin. The problem i run into is pretty basic, I can't find a simple way to pause a thread from a parent thread.
I have made all threads reentrant and i need to have the scheduler run the highest priority thread until another thread has higher priority or until completion(not share the processor at all), and none of the predefined schedulers from sched_setscheduler() allow this the way i want. I can do this easily by wraping everything in sets of mutex's and pthread_cond_wait()'s but this is going in a real time embedded system so that isnt' efficient enough. Anyone know how to pause and force reentrancy to that spot from a parent thread or even from inside the thread.
Any help on this would be greatly appriciated so i can stop banging my head on my desk,
|All times are GMT +5.5. The time now is 04:48.|