WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [PATCH RFC] do_settime is backwards?!

To: "dan.magenheimer@xxxxxxxxxx" <dan.magenheimer@xxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [PATCH RFC] do_settime is backwards?!
From: Rik van Riel <riel@xxxxxxxxxx>
Date: Wed, 6 Aug 2008 18:28:35 -0400
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 06 Aug 2008 15:29:11 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20080806155102421.00000008444@djm-pc>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Red Hat, Inc.
References: <20080806174705.5b2a64b6@xxxxxxxxxxxxxxxxxxx> <20080806155102421.00000008444@djm-pc>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Wed, 6 Aug 2008 15:51:02 -0600
"Dan Magenheimer" <dan.magenheimer@xxxxxxxxxx> wrote:

> Check out the definition of do_div which works strangely.
> I was confused by that also, but the code in question
> does work (I think!).

OK, so the original code of:

    x = (secs * 1000000000ULL) + (u64)nsecs - system_time_base;
    y = do_div(x, 1000000000);

Leaves "x" as the number of seconds and "y" as the
remainder, in nanoseconds.

Good to know that I overlooked something and the
original code was right after all!

-- 
All rights reversed.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>