[reSIProcate] Timer's Id thread safety

Alexander alt at kaluga.ru
Wed Oct 29 07:03:16 CDT 2008


Hi

While working on monotonic clock patch I have found next issue:
Class Timer has a static member mTimerCount which is used for generating
"unique" timer id.
But timers are created (and mTimerCount accessed and incremented) from
some possibly different threads: stack, dum, app.
So this counter must be implemented as atomic or mutex protected value. 

I analyzed reSIProcate's source codes and it looks like timer id feature
is never used.
My offer is to remove it at all.

Regards
Alexander Altshuler
Xeepe team
http://xeepe.com






More information about the resiprocate-devel mailing list