[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in linuxthreads ?
From: |
Wolfram Gloger |
Subject: |
Re: Bug in linuxthreads ? |
Date: |
Tue, 18 Jun 2002 10:30:40 +0200 (MDT) |
Hi,
> I was trying to pass a user-defined stack to pthread_create(), and it
> didn't work. When I debugged the pthreads library, I stumbled upon the
> following code in pthread.c:
>
>
> int __pthread_create_2_0(pthread_t *thread, const pthread_attr_t *attr,
> void * (*start_routine)(void *), void *arg)
...
> As far as I can tell, this method overwrites anything a user supplies as
> stackaddr
> and stacksize. This means that user defined stacks don't work - is this
> a bug,
> or is there a reason for it ?
This is just a backwards compatibility function, which is never
actually called when you link a new program against glibc-2.2.5. In
ancient times (glibc-2.0), there were indeed no user-defined stacks as
far as I can remember. Please look at __pthread_create_2_1 instead.
Regards,
Wolfram.