简体   繁体   中英

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM