With the wasi-sdk-pthreads cmake config, I see there is pthread_attr_getstack
but if _GNU_SOURCE
is not defined, then the functions pthread_attr_get_np
and pthread_getattr_np
are not available, so how do you use pthread_attr_getstack
as my understanding is that the pthread_attr_t
must be retrieved first before passing to pthread_attr_getstack
?
I don't know about the WASI side of this question, but it looks to me like POSIX only allows you to set your desired thread attributes before creating the thread, and the getter functions are so you can find out what you previously set in the attributes object you're constructing. As you've noted, pthread_getattr_np
for finding out what your thread actually got is a GNU libc extension.
Ah, I see, thanks!
Scott Waye has marked this topic as resolved.
Last updated: Nov 22 2024 at 17:03 UTC