summaryrefslogtreecommitdiffstats
path: root/lib/libthr/thread/thr_stack.c
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2004-01-29 09:44:36 +0000
committermtm <mtm@FreeBSD.org>2004-01-29 09:44:36 +0000
commitf488df6c994e9b1a8827ed7d4188574f09c815fb (patch)
treead5b9b25ae6d1419d325b325932ee757d75c1cd6 /lib/libthr/thread/thr_stack.c
parentab3e3b27cbf1f29151265ba6c9c730a5a0e58782 (diff)
downloadFreeBSD-src-f488df6c994e9b1a8827ed7d4188574f09c815fb.zip
FreeBSD-src-f488df6c994e9b1a8827ed7d4188574f09c815fb.tar.gz
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@morten-johansen.net>
Diffstat (limited to 'lib/libthr/thread/thr_stack.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud