lkml.org 
[lkml]   [2009]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] mmiotrace: count events lost due to not recording
On Thu, 08 Jan 2009 19:27:50 -0500
Steven Rostedt <rostedt@goodmis.org> 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
110

become cleanup fodder.


\
 
 \ /
  Last update: 2009-01-09 02:13    [W:0.075 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site