Date: Thu, 6 Jan 2005 02:16:50 GMT From: David Xu <davidxu@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 68370 for review Message-ID: <200501060216.j062Go8C065266@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501060216.j062Go8C065266>