tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PTHREAD_STACK_MIN



I just tried to compile xen, and the first problem I hit is that it makes
use of PTHREAD_STACK_MIN.

Tantalizingly, our /usr/include/limits.h says:

/* Not yet: PTHREAD_STACK_MIN */


http://pubs.opengroup.org/onlinepubs/7908799/xsh/limits.h.html suggests
that any positive value is possible:

  Minimum size in bytes of thread stack storage. Minimum Acceptable Value: 0


According to pthread_attr_getstack(3):

     The pthread_attr_setstacksize() function may additionally fail if:

     [EINVAL]           The specified stacksize is less than PTHREAD_STACK_MIN
                        or exceeds some system-imposed limit.

and pthread_attr_setstacksize returns EINVAL if
stacksize > _SC_THREAD_STACK_MIN (=59) as per /usr/include/sys/unistd.h.

Should PTHREAD_STACK_MIN be defined to 59?



Cheers,

Patrick


Home | Main Index | Thread Index | Old Index