[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
setitimer, getitimer() in rtems?
- Date: Fri, 5 Sep 2008 11:03:36 -0500
- From: joel.sherrill at OARcorp.com (Joel Sherrill)
- Subject: setitimer, getitimer() in rtems?
Gene Smith wrote:
> Joel Sherrill wrote:
>> Gene Smith wrote:
>>> Porting in some code that runs on linux, my last undefined link items
>>> are setitimer and getitimer. I can't seem to find them in rtems (4.8.0)
>>> except in the sys/time.h include file so it compiles. Saw some reference
>>> to them in old mailing list threads that implied (or said?) that you
>>> have to implement them using rtems native timer calls. Is this right?
>> Since they use POSIX signals, you would implement them
>> in the POSIX API (cpukit/posix) and implement them in terms
>> of SuperCore timers.
>> Why do you need these? And which of the three types
>> (ITIMER_REAL, ITIMER_VIRTUAL, or ITIMER_PROF) do
>> you want/need?
> Why: The function is in some existing 3rd party code I need to use for
> the project.
> Which: Actually, the code only calls setitimer with parameter ITIMER_REAL.
Good. That's what I expected. :-D
> Right now I am using rtems_timer_fire_after() with a callback function
> to do a similar thing.
It's certainly the more direct thing to do in RTEMS. The main
difference is that their method is being called in an ISR rather
than as a signal handler.
If you want these implemented, I can put together an estimate
>>> rtems-users mailing list
>>> rtems-users at rtems.com
> rtems-users mailing list
> rtems-users at rtems.com
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985