2 #include "pthread_impl.h"
5 extern size_t __default_stacksize;
6 extern size_t __default_guardsize;
8 int pthread_setattr_default_np(const pthread_attr_t *attrp)
10 /* Reject anything in the attr object other than stack/guard size. */
11 pthread_attr_t tmp = *attrp, zero = { 0 };
14 if (memcmp(&tmp, &zero, sizeof tmp))
18 if (attrp->_a_stacksize >= __default_stacksize)
19 __default_stacksize = attrp->_a_stacksize;
20 if (attrp->_a_guardsize >= __default_guardsize)
21 __default_guardsize = attrp->_a_guardsize;
27 int pthread_getattr_default_np(pthread_attr_t *attrp)
30 *attrp = (pthread_attr_t) {
31 ._a_stacksize = __default_stacksize,
32 ._a_guardsize = __default_guardsize,