Thread: High priority task

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Dec 2004
    Posts
    20

    High priority task

    Hi,

    i need to write a programm which checks every milisecond for new data through an ioport.

    In the meantime it has to do some calculations, but getting the data MUST have priority.

    I tried it with setitimer() and ITIMER_VIRTUAL calling every milisecond a sighandler function, but this fails.
    /edit : the function gets called but sometimes after more than a miliseconda

    So i wanted to ask whether there could be a better way to do this. The programm runs using root rights

    Thanks
    Last edited by BeBu; 02-15-2005 at 10:08 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. priority inversion due to pthread_mutex_lock(): how to avoid?
    By mynickmynick in forum C Programming
    Replies: 11
    Last Post: 04-07-2009, 10:34 AM
  2. crazy pipe/fork
    By fortune2k in forum C Programming
    Replies: 8
    Last Post: 03-13-2009, 11:28 AM
  3. Where do a task get "wakeuped", blocked, preempted?
    By micke_b in forum Linux Programming
    Replies: 4
    Last Post: 12-28-2007, 04:49 PM
  4. Priority Queue Help
    By cjwenigma in forum C++ Programming
    Replies: 6
    Last Post: 11-15-2007, 12:48 AM
  5. priority list won't work, i give up
    By teamster in forum C Programming
    Replies: 8
    Last Post: 10-19-2006, 12:26 PM