lkml.org 
[lkml]   [2011]   [Sep]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/5] smp: Introduce a generic on_each_cpu_mask function
From
Date
On Sun, 2011-09-25 at 11:54 +0300, Gilad Ben-Yossef wrote:
> +#define on_each_cpu_mask(mask, func, info, wait) \
> + if (cpumask_test_cpu(0, (mask))) { \
> + local_irq_disable(); \
> + func(info); \
> + local_irq_enable(); \
> + }

Typically we wrap that in an extra do { } while(0) loop to properly
consume the trailing ;


\
 
 \ /
  Last update: 2011-09-26 10:51    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog