This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: PATCH: Support pthread on IRIX 6


On Wed, Jun 13, 2001 at 11:08:53PM -0500, Loren James Rittle wrote:
> In article <20010612151932.C26522@lucon.org> you write:
> > This patch adds the pthread support on IRIX 6.
> 
> +++ gcc/gthr-posix.h    Tue Jun 12 14:55:23 2001[...]
> > -static void *__gthread_active_ptr = &pthread_create;
> > +static void *__gthread_active_ptr = &pthread_once;
> 
> FYI, this patch must be a little old since the line in question reads
> as:
> 
> static void *__gthread_active_ptr = (void *) &pthread_create;
> 
> on both mainline and 3.0 branch.
> 
> A form of this patch might be acceptable iff it were conditionalized
> to only affect the IRIX platforms where it is known to improve things
> in all cases.  The problem with this patch in the general case for all
> platforms is that there is an important reason why the pthread_create
> symbol was selected.  Whenever pthread_create is weak for a platform
> and its value is zero at run-time, then we are fairly sure that no
> threads could be created (unless they use a non-standard threading
> library for the platform - admittedly that case is not addressed).  If
> the symbol is swicthed to pthread_once, then this logical claim is not
> as strong since the only use within gthr-*.h are marked as weak.

The only reason I worked on a VERY slow IRIX box is I use it as a
reference platform for Linux/MIPS. I don't have any more time for it.
I will leave it to other people.



H.J.


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