Timer task synchronization

Detlev Zundel dzu at denx.de
Tue Jun 3 22:23:31 EST 2008

Hi Spoorthi,

>    I am dealing with timer synchronization problem.. we have two timer
> threads. The two timers are started one after the other. The first
> timer timeout value is 10s and the second timer tiemout value is 15s.
> The first timer fires after 10s and the timer thread is suspended
> until the second timer completes its task. once the second timer is
> done the first timer resumes.
> sometimes the first timer resumes back even before the second timer
> starts and blocks the second timer thread..

Reading your text, I have to admit, I have no idea whether you talk
about kernel threads, or posix threads and thus about kernel timers or
user space timers?

Without giving any more detail on what you try to do, and especially,
where you think the system does not behave as you would expect it,
nobody will be able to help you here.  Best of course is to show us some
stripped down code that exposes what you think is the problem.

Apart from that I guess that you somehow have synchronization problems
not directly related to timers at all, but that's just a gut feeling.


DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

More information about the Linuxppc-embedded mailing list