lkml.org 
[lkml]   [2003]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][2.5] replace flush_map() in arch/i386/mm/pageattr.c w ith flush_tlb_all()
On Fri, 21 Feb 2003, Dave Jones wrote:
> It would probably clean things up a lot if we had a function to do..
>
> static inline void on_each_cpu(void *func)
> {
> #ifdef CONFIG_SMP
> preempt_disable();
> smp_call_function(func, NULL, 1, 1);
> func(NULL);
> preempt_enable();
> #else
> func(NULL);
> #endif
> }

Of course that's much much better. But I think rather better as
static inline void on_each_cpu(void (*func) (void *info), void *info)
passing info to func instead of assuming NULL. inline? maybe.

Hugh

-
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: 2005-03-22 13:33    [W:1.006 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site