From owner-cvs-src@FreeBSD.ORG Thu Jan 29 01:44:37 2004 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1298D16A4CE; Thu, 29 Jan 2004 01:44:37 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 50BB843D39; Thu, 29 Jan 2004 01:44:36 -0800 (PST) (envelope-from mtm@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i0T9ia0B096503; Thu, 29 Jan 2004 01:44:36 -0800 (PST) (envelope-from mtm@repoman.freebsd.org) Received: (from mtm@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i0T9iaCH096502; Thu, 29 Jan 2004 01:44:36 -0800 (PST) (envelope-from mtm) Message-Id: <200401290944.i0T9iaCH096502@repoman.freebsd.org> From: Mike Makonnen Date: Thu, 29 Jan 2004 01:44:36 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libthr/thread thr_kern.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2004 09:44:37 -0000 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 Revision Changes Path 1.17 +11 -0 src/lib/libthr/thread/thr_kern.c