This is the mail archive of the libc-alpha@sourceware.org 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: Fixed size of thread stacks in the nptl pthread implementation


On Mon, Feb 6, 2012 at 5:12 PM, KOSAKI Motohiro
<kosaki.motohiro@gmail.com> wrote:
>>> pthread_getattr_np(&attr);
>>> ptrhead_attr_getstacksize(attr);
>>
>> No, pthread_attr_getstacksize returns the "thread *creation* stack
>> size" not the current thread stack size.
>
> Don't you read one above line?

Yes, pthread_getattr_np does provide *current* stack size but again
that doesn't say it won't grow at a later time.

Fundamentally I agree with you. The prevalent attitude is that thread
stacks in POSIX are of a fixed non-growing size.

>>http://pubs.opengroup.org/onlinepubs/007904975/functions/pthread_attr_setstacksize.html
>
> Of course, this doesn't explain platform specific extention at all.

I quoted that URL to provide a reference for my comment regarding
pthread_attr_getstacksize.

The platform specific extension is not in any standard (unless you
consider the manual pages project a standard).

Cheers,
Carlos.


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