1 #include "pthread_impl.h"
4 extern size_t __default_stacksize;
5 extern size_t __default_guardsize;
7 int pthread_setattr_default_np(const pthread_attr_t *attrp)
9 /* Reject anything in the attr object other than stack/guard size. */
10 pthread_attr_t tmp = *attrp, zero = { 0 };
13 if (memcmp(&tmp, &zero, sizeof tmp))
17 if (attrp->_a_stacksize >= __default_stacksize)
18 __default_stacksize = attrp->_a_stacksize;
19 if (attrp->_a_guardsize >= __default_guardsize)
20 __default_guardsize = attrp->_a_guardsize;
26 int pthread_getattr_default_np(pthread_attr_t *attrp)
29 *attrp = (pthread_attr_t) {
30 ._a_stacksize = __default_stacksize,
31 ._a_guardsize = __default_guardsize,