Thread: C + Linux + Periodic function

  1. #1
    Registered User
    Join Date
    Sep 2010
    Posts
    3

    C + Linux + Periodic function

    Hi

    I want to write a function that shall execute periodic. means if i set time 1 sec that function should execute in each 1 sec. let us call that function func1. But i dnt want to wait inside the func1 for that 1 sec. Meanwhile i want to run another function say func2 in background . some thing like less priority function. Whnever the time come to execute the periodic function func1 it has to go to func1 and then again in the waiting time , the second function func2 will resume.

    I wanted to know how to do it.. Can somebody tell me is it possible using signal in linux.

    Regards
    Shamnar

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Periodic program
    See forum rules about cross-posting.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Getting an error with OpenGL: collect2: ld returned 1 exit status
    By Lorgon Jortle in forum C++ Programming
    Replies: 6
    Last Post: 05-08-2009, 08:18 PM
  2. Troubleshooting Input Function
    By SiliconHobo in forum C Programming
    Replies: 14
    Last Post: 12-05-2007, 07:18 AM
  3. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  4. C++ compilation issues
    By Rupan in forum C++ Programming
    Replies: 1
    Last Post: 08-22-2005, 05:45 AM
  5. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 07:05 PM