lkml.org 
[lkml]   [2007]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] x86: Final unification of local_{32|64}.h
Harvey Harrison wrote:
>
> Do you have a stylistic preference between these two options:
>
> Option 1) Rely on CPP string constant concatenation
>
> // possibly include trailing space here to avoid remembering
> // leading space on the register names
> # define _ASM_INC "incl"
>
> static inline void local_inc(local_t *l)
> {
> __asm__ __volatile__(
> _ASM_INC " %0"
> :"+m" (l->a.counter));
> }
>

This is what I have used up to this point, except including the space in
the macro:

#define _ASM_INC " incl "

_ASM_INC "%0"

-hpa


\
 
 \ /
  Last update: 2007-12-17 00:51    [W:0.348 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site