Merge pull request #20424 from siddhesh/minstack

Fix error in usage of _SC_THREAD_STACK_MIN in test
pull/21209/head
Yash Tibrewal 5 years ago committed by GitHub
commit 838f6c9fb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/core/lib/gprpp/thd_posix.cc

@ -59,8 +59,9 @@ size_t RoundUpToPageSize(size_t size) {
// Returns the minimum valid stack size that can be passed to
// pthread_attr_setstacksize.
size_t MinValidStackSize(size_t request_size) {
if (request_size < _SC_THREAD_STACK_MIN) {
request_size = _SC_THREAD_STACK_MIN;
size_t min_stacksize = sysconf(_SC_THREAD_STACK_MIN);
if (request_size < min_stacksize) {
request_size = min_stacksize;
}
// On some systems, pthread_attr_setstacksize() can fail if stacksize is

Loading…
Cancel
Save