[lkml]   [2009]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 3/3] mmiotrace: count events lost due to not recording
    On Thu, 08 Jan 2009 19:27:50 -0500
    Steven Rostedt <> wrote:

    > +static atomic_t dropped_count;

    Formally, this should be

    static atomic_t dropped_count = ATOMIC_INIT(0);

    but no atomic_t implementations need that, and I'm sure that if one
    turns up wchih _does_ need it (say, it has a spinlock inside its
    atomic_t) then the kernel would break all over the place.

    So perhaps we should formally state that the all-zeroes pattern is an
    acceptable way of initialising an atomic_t.

    In which case these:

    y:/usr/src/linux-2.6.28> grep -r "atomic_t.*=.*ATOMIC_INIT" . | wc -l

    become cleanup fodder.

     \ /
      Last update: 2009-01-09 02:13    [W:0.019 / U:4.268 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site