Re: [RFC 05/31] x86/compiler: Tweak __UNIQUE_ID naming

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 03, 2024 at 09:56:34AM +0200, Peter Zijlstra wrote:
> > -#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
> > +/* Format: __UNIQUE_ID_<name>_<__COUNTER__> */
> > +#define __UNIQUE_ID(name)					\
> > +	__PASTE(__UNIQUE_ID_,					\
> > +	__PASTE(name,						\
> > +	__PASTE(_, __COUNTER__)))
> 
> OK, that's just painful to read; how about so?
> 
> 	__PASTE(__UNIQUE_ID_,					\
> 	        __PASTE(name,					\
> 		        __PASTE(_, __COUNTER)))

Sure.

> >  /**
> >   * data_race - mark an expression as containing intentional data races
> > @@ -218,7 +222,7 @@ void ftrace_likely_update(struct ftrace_likely_data *f, int val,
> >   */
> >  #define ___ADDRESSABLE(sym, __attrs) \
> >  	static void * __used __attrs \
> > -	__UNIQUE_ID(__PASTE(__addressable_,sym)) = (void *)(uintptr_t)&sym;
> > +	__UNIQUE_ID(__PASTE(addressable_, sym)) = (void *)(uintptr_t)&sym;
> 
> This change doesn't get mention ?

Hm, I have no idea why I did that...  I'll drop it.

-- 
Josh




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux Kernel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux