bug-hurd
[Top][All Lists]
Advanced

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

Re: pthread headers


From: Marcus Brinkmann
Subject: Re: pthread headers
Date: Wed, 12 Jan 2005 12:25:55 +0100
User-agent: Wanderlust/2.10.1 (Watching The Wheels) SEMI/1.14.6 (Maruoka) FLIM/1.14.6 (Marutamachi) APEL/10.6 Emacs/21.3 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)

At Tue, 11 Jan 2005 23:49:06 -0200,
pietro <pietro@bastardi.net> wrote:
> i did a grep for inline in the libpthread/include dir and only 
> pthread/pthread.h has inline in it. i'm attaching a patch that changes 
> inlie to __inline__ as discussed in this list.

I don't think this is quite correct.  If it is extern inline
(irregardless if you use inline, __inline or __inline__), it may not
be inlined, but an external reference will be generated.  Does our
libpthread contain definitions for these inline functions?

If not, we will need to add them, by replacting extern inline with a macro:

#ifndef __PTHREAD_EXTERN_INLINE
#define __PTHREAD_EXTERN_INLINE extern __inline
#endif

and including a file in the compilation of the library that does
something like:

#define __PTHREAD_EXTERN_INLINE
#include <pthread.h>

Or whatever is required.

The alternative is to use the attribute always_inline, or just to use
static inline.  As the inline functions are merely wrappers, this
seems appropriate, too.  (of course, always inline only works with gcc).

Thanks,
Marcus




reply via email to

[Prev in Thread] Current Thread [Next in Thread]