ukernel: set pthread stacksize to an integer multiple of 8k

because some pthread stacks require this to be in units of page size,
guess that page sizes will be 4k or 8k, and use the larger as a divisor

Change-Id: I9f89f7e32e2a70e12f1ed7a7fb86cab171b61e07
Reviewed-on: http://gerrit.openafs.org/5606
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
Derrick Brashear 2011-10-12 13:09:42 -04:00
parent eead07418f
commit 7ae1921b76

View File

@ -951,7 +951,7 @@ extern pthread_cond_t usr_sleep_cond;
do { \
pthread_attr_t attr; \
assert(pthread_attr_init(&attr) == 0); \
assert(pthread_attr_setstacksize(&attr, 124288) == 0); \
assert(pthread_attr_setstacksize(&attr, 122880) == 0); \
assert(pthread_create((A), &attr, (B), (void *)(C)) == 0); \
assert(pthread_attr_destroy(&attr) == 0); \
} while(0)