lkml.org 
[lkml]   [2006]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/4] jiffies: Add 64bit jiffies compares (needed when long < 64bit).
    These compares are there to use jiffies_64 safely on 32bit and 64 bit
    systems, and jiffies_64 (and thus get_jiffies_64()) is always defined
    as u64. Since this is not arch code, but generic for all
    architectures, it should use the generic u64/s64 types. If the user
    passes in a long and assumes that it's 64 bit, then it is user error.
    I'll add a comment that says that these macros must be used with u64
    values (as returned by get_jiffies_64()).

    Thanks.

    --Dima

    P.S. This also means that currently, on 64 bit systems,
    time_before/time_after is broken (typecheck fails) on values returned
    by get_jiffies_64().

    On 9/20/06, Andi Kleen <ak@suse.de> wrote:
    >
    > > +#define time_after64(a,b) \
    > > + (typecheck(__u64, a) && \
    > > + typecheck(__u64, b) && \
    >
    > Did you double check the typecheck DTRT when someone
    > passes in both plain long and long long on 64bit?
    >
    > -Andi
    >
    >
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-09-21 01:11    [W:0.025 / U:94.100 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site