search for: __inline

Displaying 20 results from an estimated 114 matches for "__inline".

2018 Jun 05
3
[PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations
...definition errors > + * of extern inline functions at link time. > */ > #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ > !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) > -#define inline inline __attribute__((always_inline,unused)) notrace > -#define __inline__ __inline__ __attribute__((always_inline,unused)) notrace > -#define __inline __inline __attribute__((always_inline,unused)) notrace > +#define inline \ > + inline __attribute__((always_inline, unused, gnu_inline)) notrace > +#define __inline__ \ > + __inline__ __attribute__((always...
2018 Jun 05
3
[PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations
...definition errors > + * of extern inline functions at link time. > */ > #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ > !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) > -#define inline inline __attribute__((always_inline,unused)) notrace > -#define __inline__ __inline__ __attribute__((always_inline,unused)) notrace > -#define __inline __inline __attribute__((always_inline,unused)) notrace > +#define inline \ > + inline __attribute__((always_inline, unused, gnu_inline)) notrace > +#define __inline__ \ > + __inline__ __attribute__((always...
2018 Jun 05
0
[PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations
On Tue, 2018-06-05 at 10:23 -0700, Joe Perches wrote: > Perhaps these are simpler as > > #define __inline__ inline > #define __inline inline Currently, there are these uses of inline variants in the kernel $ git grep -w inline | wc -l 68410 $ git grep -w __inline__ | wc -l 503 $ git grep -w __inline | wc -l 57 So it seems it's also reasonable to sed all uses of __inline to inline and perhaps...
2018 Jun 05
0
[PATCH v2 1/2] compiler-gcc.h: add gnu_inline to all inline declarations
On Tue, 2018-06-05 at 12:50 -0700, Nick Desaulniers wrote: > On Tue, Jun 5, 2018 at 12:14 PM Joe Perches <joe at perches.com> wrote: > > > > On Tue, 2018-06-05 at 10:23 -0700, Joe Perches wrote: > > > Perhaps these are simpler as > > > > > > #define __inline__ inline > > > #define __inline inline > > > > Currently, there are these uses of inline variants in the kernel > > > > $ git grep -w inline | wc -l > > 68410 > > $ git grep -w __inline__ | wc -l > > 503 > > $ git grep -w __inline |...
2012 Jul 06
3
[LLVMdev] Problem with __inline keyword
I'm attempting to use clang/llvm to compile some legacy C code, and am running into a strange issue. There are several functions in my codebase which make use of the __inline keyword, but do not include the customary static keyword along with it. When I compile these files, the generated code appears not to have any of the function definitions in it--just undefined references to external symbols. Specifically, if I have the following test program: __inline int foo()...
2012 Jul 06
2
[LLVMdev] Excessive register spilling in large automatically generated functions, such as is found in FFTW
...the code for a 32-point FFT that generated the above instructions. Sorry I can't supply a smaller example, but this only begins to happen with functions of this size. Regards, Anthony ////////////////////// CODE ///////////////////////////////////////// #include <xmmintrin.h> #define __INLINE static inline __attribute__((always_inline)) #define LOAD _mm_load_ps #define STORE _mm_store_ps #define ADD _mm_add_ps #define SUB _mm_sub_ps #define MULT _mm_mul_ps #define STREAM _mm_stream_ps #define SHUF _mm_shuffle_ps #define VLIT4(a,b,c,d) _mm_set_ps(a,b,c,d) #define SWAP(d) SHUF(d,d,_MM_SHU...
2012 Jul 06
0
[LLVMdev] Problem with __inline keyword
Hello > I know there are some weird semantics among different compilers with > the inline/__inline keywords in C when you don't pair them with > static, but I can't imagine that this is correct. Is there a bug > here, or am I missing something? Yes, clang is correct here, you're missing C99 inline semantics. You can either read C99 standard or http://clang.llvm.org/compatibili...
2018 Jun 07
0
[PATCH v3 1/3] compiler-gcc.h: add gnu_inline to all inline declarations
...definition errors > + * of extern inline functions at link time. > */ > #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ > !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) > -#define inline inline __attribute__((always_inline,unused)) notrace > -#define __inline__ __inline__ __attribute__((always_inline,unused)) notrace > -#define __inline __inline __attribute__((always_inline,unused)) notrace > +#define inline \ > + inline __attribute__((always_inline, unused, gnu_inline)) notrace > +#define __inline__ inline > +#define __inline inline >...
2007 May 05
1
inline in Visual Studio 8
Actually, it looks like this is already done in Speex as of revision 7150 in SVN (7/15/2004). As long as HAVE_CONFIG_H is defined in the project settings (which it is in all of the project files in SVN), win32\config.h should be included, and this has #define inline __inline in it. Oleg - you should make sure HAVE_CONFIG_H is defined in your project settings. And, you didn't say which source file you were trying to compile when you got the error, but it should have the following at the top of it: #ifdef HAVE_CONFIG_H #include "config.h" #endif Tom...
2007 Aug 24
0
Fixes to make flac build on Solaris
...t; --- flac-1.1.3/src/plugin_common/tags.c.orig 2006-11-30 >> 15:58:34.067469000 +0000 >> +++ flac-1.1.3/src/plugin_common/tags.c 2006-11-30 16:00:10.958487000 >> +0000 >> @@ -29,7 +29,7 @@ >> #include "FLAC/metadata.h" >> >> >> -static __inline unsigned local__wide_strlen(const FLAC__uint16 *s) >> +static inline unsigned local__wide_strlen(const FLAC__uint16 *s) >> { >> unsigned n = 0; >> while(*s++) >> @@ -43,7 +43,7 @@ >> * and a more clear explanation at the end of this section: >> *...
2007 Apr 18
0
[RFC, PATCH 15/24] i386 Vmi apic header
...clude <asm/apicdef.h> #include <asm/processor.h> #include <asm/system.h> +#include <mach_apicops.h> #define Dprintk(x...) @@ -45,25 +46,6 @@ static inline void lapic_enable(void) #ifdef CONFIG_X86_LOCAL_APIC -/* - * Basic functions accessing APICs. - */ - -static __inline void apic_write(unsigned long reg, unsigned long v) -{ - *((volatile unsigned long *)(APIC_BASE+reg)) = v; -} - -static __inline void apic_write_atomic(unsigned long reg, unsigned long v) -{ - xchg((volatile unsigned long *)(APIC_BASE+reg), v); -} - -static __inline unsigned long apic_read(unsigned...
2007 Apr 18
0
[RFC, PATCH 15/24] i386 Vmi apic header
...clude <asm/apicdef.h> #include <asm/processor.h> #include <asm/system.h> +#include <mach_apicops.h> #define Dprintk(x...) @@ -45,25 +46,6 @@ static inline void lapic_enable(void) #ifdef CONFIG_X86_LOCAL_APIC -/* - * Basic functions accessing APICs. - */ - -static __inline void apic_write(unsigned long reg, unsigned long v) -{ - *((volatile unsigned long *)(APIC_BASE+reg)) = v; -} - -static __inline void apic_write_atomic(unsigned long reg, unsigned long v) -{ - xchg((volatile unsigned long *)(APIC_BASE+reg), v); -} - -static __inline unsigned long apic_read(unsigned...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 04/17] pavarvirt_ops - apci header updates
....com> Index: clean-start/include/asm-x86_64/apic.h =================================================================== --- clean-start.orig/include/asm-x86_64/apic.h +++ clean-start/include/asm-x86_64/apic.h @@ -37,16 +37,24 @@ struct pt_regs; * Basic functions accessing APICs. */ -static __inline void apic_write(unsigned long reg, unsigned int v) +static __inline void native_apic_write(unsigned long reg, unsigned int v) { *((volatile unsigned int *)(APIC_BASE+reg)) = v; } -static __inline unsigned int apic_read(unsigned long reg) +static __inline unsigned int native_apic_read(unsigned...
2007 Apr 18
0
[RFC/PATCH PV_OPS X86_64 04/17] pavarvirt_ops - apci header updates
....com> Index: clean-start/include/asm-x86_64/apic.h =================================================================== --- clean-start.orig/include/asm-x86_64/apic.h +++ clean-start/include/asm-x86_64/apic.h @@ -37,16 +37,24 @@ struct pt_regs; * Basic functions accessing APICs. */ -static __inline void apic_write(unsigned long reg, unsigned int v) +static __inline void native_apic_write(unsigned long reg, unsigned int v) { *((volatile unsigned int *)(APIC_BASE+reg)) = v; } -static __inline unsigned int apic_read(unsigned long reg) +static __inline unsigned int native_apic_read(unsigned...
2018 Nov 01
2
PROPOSAL: Extend inline asm syntax with size spec
On Wed, Oct 31, 2018 at 10:20:00PM -0700, Joe Perches wrote: > On Wed, 2018-10-31 at 13:55 +0100, Peter Zijlstra wrote: > > > > Anyway, with the below patch, I get: > > > > text data bss dec hex filename > > 17385183 5064780 1953892 24403855 1745f8f defconfig-build/vmlinux > > 17385678 5064780 1953892 24404350
2018 Nov 01
2
PROPOSAL: Extend inline asm syntax with size spec
On Wed, Oct 31, 2018 at 10:20:00PM -0700, Joe Perches wrote: > On Wed, 2018-10-31 at 13:55 +0100, Peter Zijlstra wrote: > > > > Anyway, with the below patch, I get: > > > > text data bss dec hex filename > > 17385183 5064780 1953892 24403855 1745f8f defconfig-build/vmlinux > > 17385678 5064780 1953892 24404350
2011 May 17
1
[LLVMdev] clang, windows.h, inline and static
List, I am working on having clang parse a recent windows.h header. I am encountering great success, however I have one problem with inlined functions. In winnt.h, there are a series of definitions for Int64ShllMod32 and related functions, these functions are defined as __inline. Compiling a multi file project with clang produces errors because these functions appear more than once and at link time collisions occur. The problem seems to stem from the functions not being defined as 'static'. If the functions are defined as static, they are inlined and removed durin...
2018 Jul 20
0
[PATCH 4.4 04/31] compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
...functions at link time. + * A lot of inline functions can cause havoc with function tracing. */ #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) -#define inline inline __attribute__((always_inline,unused)) notrace -#define __inline__ __inline__ __attribute__((always_inline,unused)) notrace -#define __inline __inline __attribute__((always_inline,unused)) notrace +#define inline \ + inline __attribute__((always_inline, unused)) notrace __gnu_inline #else -/* A lot of inline functions can cause havoc with function tracing */ -#...
2018 Jul 20
0
[PATCH 4.9 05/66] compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
...functions at link time. + * A lot of inline functions can cause havoc with function tracing. */ #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) -#define inline inline __attribute__((always_inline,unused)) notrace -#define __inline__ __inline__ __attribute__((always_inline,unused)) notrace -#define __inline __inline __attribute__((always_inline,unused)) notrace +#define inline \ + inline __attribute__((always_inline, unused)) notrace __gnu_inline #else -/* A lot of inline functions can cause havoc with function tracing */ -#...
2018 Jul 20
0
[PATCH 4.14 01/92] compiler-gcc.h: Add __attribute__((gnu_inline)) to all inline declarations
...functions at link time. + * A lot of inline functions can cause havoc with function tracing. */ #if !defined(CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING) || \ !defined(CONFIG_OPTIMIZE_INLINING) || (__GNUC__ < 4) -#define inline inline __attribute__((always_inline,unused)) notrace -#define __inline__ __inline__ __attribute__((always_inline,unused)) notrace -#define __inline __inline __attribute__((always_inline,unused)) notrace +#define inline \ + inline __attribute__((always_inline, unused)) notrace __gnu_inline #else -/* A lot of inline functions can cause havoc with function tracing */ -#...