diff options
Diffstat (limited to 'libc-top-half/musl/src/thread/pthread_attr_setstacksize.c')
-rw-r--r-- | libc-top-half/musl/src/thread/pthread_attr_setstacksize.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/thread/pthread_attr_setstacksize.c b/libc-top-half/musl/src/thread/pthread_attr_setstacksize.c new file mode 100644 index 0000000..9c6a880 --- /dev/null +++ b/libc-top-half/musl/src/thread/pthread_attr_setstacksize.c @@ -0,0 +1,9 @@ +#include "pthread_impl.h" + +int pthread_attr_setstacksize(pthread_attr_t *a, size_t size) +{ + if (size-PTHREAD_STACK_MIN > SIZE_MAX/4) return EINVAL; + a->_a_stackaddr = 0; + a->_a_stacksize = size; + return 0; +} |