From: | Kurt Harriman <harriman(at)acm(dot)org> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Patch: Remove gcc dependency in definition of inline functions |
Date: | 2009-12-15 11:15:15 |
Message-ID: | 4B276FC3.1010108@acm.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Attached is a revised patch, offered for the 2010-01 commitfest.
It's also available in my git repository in the "submitted" branch:
http://git.postgresql.org/gitweb?p=users/harriman/share.git;a=shortlog;h=refs/heads/submitted
In this version, the "configure" script tests whether a static
inline function can be defined without incurring a warning when
not referenced. If successful, the preprocessor symbol PG_INLINE
is defined in pg_config.h to the appropriate keyword: inline,
__inline, __inline__, or __forceinline. Otherwise PG_INLINE
remains undefined.
palloc.h and pg_list.h condition their inline function
definitions on PG_INLINE instead of the gcc-specific __GNUC__.
Thus the functions can be inlined on more platforms, not only
gcc.
Ordinary out-of-line calls are still used if the compiler doesn't
recognize inline functions, or spews warnings when static inline
functions are defined but not referenced.
Regards,
... kurt
Attachment | Content-Type | Size |
---|---|---|
inline-across-platforms.zip | application/octet-stream | 2.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Hiroyuki Yamada | 2009-12-15 11:25:31 | An example of bugs for Hot Standby |
Previous Message | Hiroyuki Yamada | 2009-12-15 11:11:52 | An example of bugs for Hot Standby |