From owner-p4-projects@FreeBSD.ORG Thu Jan 6 02:16:51 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id F24B716A4D0; Thu, 6 Jan 2005 02:16:50 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C9D7516A4CE for ; Thu, 6 Jan 2005 02:16:50 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B1E1A43D2F for ; Thu, 6 Jan 2005 02:16:50 +0000 (GMT) (envelope-from davidxu@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j062GoZC065269 for ; Thu, 6 Jan 2005 02:16:50 GMT (envelope-from davidxu@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j062Go8C065266 for perforce@freebsd.org; Thu, 6 Jan 2005 02:16:50 GMT (envelope-from davidxu@freebsd.org) Date: Thu, 6 Jan 2005 02:16:50 GMT Message-Id: <200501060216.j062Go8C065266@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to davidxu@freebsd.org using -f From: David Xu To: Perforce Change Reviews Subject: PERFORCE change 68370 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2005 02:16:52 -0000 http://perforce.freebsd.org/chv.cgi?CH=68370 Change 68370 by davidxu@davidxu_celeron on 2005/01/06 02:16:41 Follow changes of ETIMEDOUT error code made in kernel. Affected files ... .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_cond.c#8 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex.c#11 edit .. //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sem.c#8 edit Differences ... ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_cond.c#8 (text+ko) ==== @@ -217,7 +217,7 @@ THR_LOCK_ACQUIRE(curthread, &cv->c_lock); seq = cv->c_seqno; if (abstime != NULL && ret != 0) { - if (ret == EAGAIN || ret == EINTR) + if (ret == EINTR) ret = ETIMEDOUT; break; } ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_mutex.c#11 (text+ko) ==== @@ -529,7 +529,7 @@ * Timed out wait is not restarted if * it was interrupted, not worth to do it. */ - if (ret == EAGAIN || ret == EINTR) + if (ret == EINTR) ret = ETIMEDOUT; } if (ret == 0) { @@ -633,9 +633,7 @@ if (abstime) { ret = umtx_timedwait((struct umtx *)&curthread->cycle, cycle, abstime); - if (ret == EAGAIN) - ret = ETIMEDOUT; - else + if (ret != ETIMEDOUT) ret = 0; } else { umtx_wait((struct umtx *)&curthread->cycle, cycle); @@ -722,9 +720,7 @@ if (abstime) { ret = umtx_timedwait((struct umtx *)&curthread->cycle, cycle, abstime); - if (ret == EAGAIN) - ret = ETIMEDOUT; - else + if (ret != ETIMEDOUT) ret = 0; } else { umtx_wait((struct umtx *)&curthread->cycle, cycle); ==== //depot/projects/davidxu_thread/src/lib/libthread/thread/thr_sem.c#8 (text+ko) ==== @@ -211,8 +211,6 @@ retval = umtx_timedwait((struct umtx *)&(*sem)->count, 0, abstime); _thr_cancel_leave(curthread, oldcancel); } while (retval == 0); - if (retval == EAGAIN) - retval = ETIMEDOUT; errno = retval; return (-1); }