Review Board 1.7.16

1.6 sip deadlock fix

Review Request #287 - Created June 19, 2009 and submitted

Matthew Nicholson
This fixes a potential deadlock in the 1.6.2 branch.  This fix has been back ported from trunk.
Tested with trunk.  No testing done for 1.6.2.
Ship it!
Posted (June 19, 2009, 7:48 a.m.)
Other than this one comment, the changes look fine to me.
/branches/1.6.2/channels/chan_sip.c (Diff revision 1)
Is there a good reason to use usleep(1) instead of sched_yield()?
  1. I don't know of any good reason.
    This link has something to say about the subject:
    That does not fully apply here though.
  2. sched_yield is something in between a NOP and a wait for all other processes to exhaust their time slices. Either end of the spectrum is fairly useless, and there's no guarantee that the next Linux (or non-Linux for that matter) kernel will do what you want.
    Ingo Molnar: "Really, i have never seen a _single_ mainstream app where the use of sched_yield() was the right choice." runs on a server provided by Digium, Inc. and uses bandwidth donated to the open source Asterisk community by API Digital Communications in Huntsville, AL USA.
Please report problems with this site to