lkml.org 
[lkml]   [2009]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 14/16] percpu: make access macros universal
On Wed, 14 Oct 2009, Tejun Heo wrote:

> @@ -182,17 +185,19 @@ static inline void *pcpu_lpage_remapped(void *kaddr)
> #ifndef percpu_read
> # define percpu_read(var) \
> ({ \
> - typeof(var) __tmp_var__; \
> - __tmp_var__ = get_cpu_var(var); \
> - put_cpu_var(var); \
> - __tmp_var__; \
> + typeof(var) *pr_ptr__ = &(var); \
> + typeof(var) pr_ret__; \
> + pr_ret__ = get_cpu_var(*pr_ptr__); \
> + put_cpu_var(*pr_ptr__); \
> + pr_ret__; \
> })
> #endif

== this_cpu_read(var) ?



\
 
 \ /
  Last update: 2009-10-14 16:59    [W:0.150 / U:24.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site