Debian Codegraph @

libc-top-half/musl/src/thread/pthread_attr_setguardsize.c

raw
1 #include "pthread_impl.h"
2
3 int pthread_attr_setguardsize(pthread_attr_t *a, size_t size)
4 {
5 #ifdef __wasilibc_unmodified_upstream
6 if (size > SIZE_MAX/8) return EINVAL;
7 #else
8 /* WASI doesn't have memory protection required for stack guards. */
9 if (size > 0) return EINVAL;
10 #endif
11 a->_a_guardsize = size;
12 return 0;
13 }