lkml.org 
[lkml]   [2008]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [patch 04/41] cpu ops: Core piece for generic atomic per cpu operations
Date
On Friday 30 May 2008 15:17:55 Christoph Lameter wrote:
> On Thu, 29 May 2008, Andrew Morton wrote:
> > > local_irq_save(flags);
> > > /* Calculate address of per processor area */
> > > p = CPU_PTR(stat, smp_processor_id());
> > > p->counter++;
> > > local_irq_restore(flags);
> >
> > eh? That's what local_t is for?
>
> No that is what local_t exactly cannot do.

Yes, but this is local_t for dynamically allocated per-cpu vars. You've lost
potential symmetry and invented a whole new nomenclature :(

local_ptr_inc() etc would be far preferable IMHO.

Cheers,
Rusty.


\
 
 \ /
  Last update: 2008-05-30 08:55    [W:0.079 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site