From owner-freebsd-threads@FreeBSD.ORG Sat Feb 18 05:47:10 2012 Return-Path: Delivered-To: threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 01691106564A; Sat, 18 Feb 2012 05:47:10 +0000 (UTC) (envelope-from listlog2011@gmail.com) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C0A7A8FC14; Sat, 18 Feb 2012 05:47:09 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q1I5l5uh054728; Sat, 18 Feb 2012 05:47:07 GMT (envelope-from listlog2011@gmail.com) Message-ID: <4F3F3B57.5070700@gmail.com> Date: Sat, 18 Feb 2012 13:47:03 +0800 From: David Xu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 MIME-Version: 1.0 To: Julian Elischer References: <4F3C2671.3090808__7697.00510795719$1329343207$gmane$org@freebsd.org> <4F3E0A90.6080400@freebsd.org> <4F3E39EF.3030209@gmail.com> <201202171117.46626.jkim@FreeBSD.org> <4F3EFF35.8040901@freebsd.org> In-Reply-To: <4F3EFF35.8040901@freebsd.org> Content-Type: multipart/mixed; boundary="------------040401090208010403080104" Cc: FreeBSD Stable , Alexander Kabaev , Andriy Gapon , "davidxu@freebsd.org" , "threads@freebsd.org" , Jung-uk Kim Subject: Re: pthread_cond_timedwait() broken in 9-stable? (from JAN 10) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: davidxu@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Feb 2012 05:47:10 -0000 This is a multi-part message in MIME format. --------------040401090208010403080104 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 2012/2/18 9:30, Julian Elischer wrote: >> > > mine is too, yet it still has problems.. > CPU: Intel(R) Xeon(R) CPU E5420 @ 2.50GHz (2500.14-MHz > K8-class CPU) > Origin = "GenuineIntel" Id = 0x10676 Family = 6 Model = 17 > Stepping = 6 > > Features=0xbfebfbff > > Features2=0xce3bd > AMD Features=0x20100800 > AMD Features2=0x1 > TSC: P-state invariant, performance statistics > real memory = 8589934592 (8192 MB) > avail memory = 8214368256 (7833 MB) > Event timer "LAPIC" quality 400 > ACPI APIC Table: > FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs > FreeBSD/SMP: 1 package(s) x 4 core(s) > cpu0 (BSP): APIC ID: 0 > cpu1 (AP): APIC ID: 1 > cpu2 (AP): APIC ID: 2 > cpu3 (AP): APIC ID: 3 > ioapic0 irqs 0-23 on motherboard > ioapic1 irqs 24-47 on motherboard > > Attached file is a small patch, don't know if it works for you, I can only find this at the moment. --------------040401090208010403080104 Content-Type: text/plain; name="thr_umtx.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="thr_umtx.c.diff" Index: src/lib/libthr/thread/thr_umtx.c =================================================================== --- src/lib/libthr/thread/thr_umtx.c (revision 231637) +++ src/lib/libthr/thread/thr_umtx.c (working copy) @@ -205,7 +205,7 @@ if (abstime != NULL) { clock_gettime(clockid, &ts); TIMESPEC_SUB(&ts2, abstime, &ts); - if (ts2.tv_sec < 0 || ts2.tv_nsec <= 0) + if (ts2.tv_sec < 0 || (ts2.tv_sec == 0 && ts2.tv_nsec <= 0)) return (ETIMEDOUT); tsp = &ts2; } else { --------------040401090208010403080104--