From owner-p4-projects@FreeBSD.ORG Tue May 9 20:51:33 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 1DAD616A527; Tue, 9 May 2006 20:51:33 +0000 (UTC) X-Original-To: perforce@freebsd.org 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 E262A16A4ED for ; Tue, 9 May 2006 20:51:32 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id AEB9F43D48 for ; Tue, 9 May 2006 20:51:32 +0000 (GMT) (envelope-from jb@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 k49KpW4A086720 for ; Tue, 9 May 2006 20:51:32 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k49KpWi1086714 for perforce@freebsd.org; Tue, 9 May 2006 20:51:32 GMT (envelope-from jb@freebsd.org) Date: Tue, 9 May 2006 20:51:32 GMT Message-Id: <200605092051.k49KpWi1086714@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 96875 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 May 2006 20:51:33 -0000 http://perforce.freebsd.org/chv.cgi?CH=96875 Change 96875 by jb@jb_freebsd2 on 2006/05/09 20:51:20 Convert from 'uptime' times to 'real' times so that the timed wait does a sensible thing... like wait until the time we expected. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_work.c#8 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_work.c#8 (text) ==== @@ -75,7 +75,6 @@ (void) pthread_mutex_lock(&dph->dph_lock); -#if defined(sun) now = gethrtime(); if (earliest < now) { @@ -83,6 +82,7 @@ return; /* sleep duration has already past */ } +#if defined(sun) tv.tv_sec = (earliest - now) / NANOSEC; tv.tv_nsec = (earliest - now) % NANOSEC; @@ -93,6 +93,7 @@ */ (void) pthread_cond_reltimedwait_np(&dph->dph_cv, &dph->dph_lock, &tv); #else + earliest -= now; clock_gettime(CLOCK_REALTIME,&tv); tv.tv_sec += earliest / NANOSEC; tv.tv_nsec += earliest % NANOSEC;