cvs commit: src/lib/libthr/thread thr_kern.c

Mike Makonnen mtm at FreeBSD.org
Thu Jan 29 01:44:37 PST 2004


mtm         2004/01/29 01:44:36 PST

  FreeBSD src repository

  Modified files:
    lib/libthr/thread    thr_kern.c 
  Log:
  When suspending a thread if the timeout was very short or
  the system call got interrupted and the absolute timeout is
  converted to a relative timeout, it may happen that we get a
  negative number. In such a case, simply set the timeout to
  zero so that if the event that the thread wants to wait for has
  happened it can still return successfully, but if it hasn't
  happened then the thread doesn't suspend indefinitely. This should
  fix certain applications (including mozilla) that seem to hang
  indefinitely sometimes.
  
  Noticed and debugged by: Morten Johansen <root at morten-johansen.net>
  
  Revision  Changes    Path
  1.17      +11 -0     src/lib/libthr/thread/thr_kern.c


More information about the cvs-all mailing list