aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-26 15:29:46 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2008-08-26 15:29:46 +0000
commit3d72928ca60e0ac17cce2145b0998a1a4fdae1b9 (patch)
treea6c5f8dc70c920406d8dd4d4cc65422afe045151
parent19868b7815838d3c0a201c66cc0be42edce8ee47 (diff)
Blocked revisions 140053 via svnmerge
................ r140053 | russell | 2008-08-26 10:29:25 -0500 (Tue, 26 Aug 2008) | 23 lines Merged revisions 140051 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r140051 | russell | 2008-08-26 10:27:23 -0500 (Tue, 26 Aug 2008) | 15 lines 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.6.0@140054 f38db490-d61c-443f-a65b-d21fe96a405b
0 files changed, 0 insertions, 0 deletions