aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_dahdi.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-26 15:27:23 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-26 15:27:23 +0000
commite8055b199fedf6b327da7cf8c6b6ffeace54fa4a (patch)
tree6c49b0df66aa95c1fd348fe96f26d77a3f1ca478 /channels/chan_dahdi.c
parent2e07cd95ad31de9360dfb2cb6296298054404801 (diff)
Fix a race condition with the IAX scheduler thread. A lock and condition are
used here to allow newly scheduled tasks to wake up the scheduler just in case the new task needs to run sooner than the current wakeup time when the thread is sleeping. However, there was a race condition such that a newly scheduled task would not properly wake up the scheduler or affect the wake up period. The order of execution would have been: 1) Scheduler thread determines wake up time of N ms. 2) Another thread schedules a task and signals the condition, with an execution time of < N ms. 3) Scheduler thread locks and goes to sleep for N ms. By moving the sleep time determination to inside the critical section, this possibility is avoided. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@140051 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_dahdi.c')
0 files changed, 0 insertions, 0 deletions