C Posix thread scheduler

Discussion in 'C' started by Silcrome, Jul 28, 2008.

  1. Silcrome

    Silcrome New Member

    Jul 28, 2008
    Likes Received:
    Trophy Points:
    Software Engineer
    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,


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice