This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] New condvar implementation that provides stronger ordering guarantees.

On 06/14/2016 10:40 PM, Carlos O'Donell wrote:
On 06/14/2016 04:14 PM, Florian Weimer wrote:
I believe pthread_cond_common.c is similar.  It doesn't use the
preprocessor to alter any behavior, but just uses C to provide
commonly used functionality.  It doesn't provide any functions that
are just declarations, so something a C header would typically do.

We already have header files which contain inline functions,
something that is quite natural.

These are usually marked 'always inline' though aren't they? They
are basically equivalent to enhanced macros.

They are usually marked inline. But there are exceptions, e.g. sysdeps/unix/sysv/linux/default-sched.h.

It's also not completely clear to me if other case just use âstatic inlineâ to suppress the unused function warning.

If the functions are not expected to be inlined, you should put them
in their own file, and declare them with attribute_hidden for PLT

I think the point here is that they may be inlined and we want to
leave it up to the compiler to decide.

But the compiler cannot make well-informed decisions because it will assume that static functions are local to the current translation, when it fact they are not (from the perspective of the cost in terms of code size of not inlining them).

Anyway, I still prefer the current split over putting everything into a single source file.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]