Is PTHREAD_STACK_MIN defined differently in Ubuntu 10.04 then on Ubuntu 9.04?

10.5k Views Asked by At

First it seems as if the location of definition has changed: in 9.04 its somewhere through pthread.h and in 10.04 its through limits.h (can someone please confirm it? where is it actually defined in each version?)

Second, have the values changed between the two versions?

Thanks

Ben

1

There are 1 best solutions below

0
osgx On

You should include only <pthread.h> and it should include PTHREAD_STACK_MIN definition, directly or indirectly. I can't check an ubuntu, but searching in glibc sources http://www.google.com/codesearch#search/&q=%22define%20PTHREAD_STACK_MIN%22%20glibc&type=cs&p=1 shows that it is sometimes in pthread.h and sometimes in bits/local_lim.h.

This is typically 16 KB for x86 and somewhat bigger for MIPS and Itamium.

Update: Hmmm.. I was wrong. This definition was moved to <limits.h> (indirectly), so you should to include both files.