X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fdefaults.h;h=178a601dfde3b38c619a421642564aefd078ac7a;hp=f05030766a77be8dae7452e4fdaae94205378d79;hb=1a1a34b40ab10a195633b1ed5e2e9b42fdae0a78;hpb=0452bf084c6d8416b88c2bb941e99eb4eec453b8 diff --git a/src/common/defaults.h b/src/common/defaults.h index f05030766..178a601df 100644 --- a/src/common/defaults.h +++ b/src/common/defaults.h @@ -354,4 +354,16 @@ size_t default_get_ust_pid_channel_subbuf_size(void); LTTNG_HIDDEN size_t default_get_ust_uid_channel_subbuf_size(void); +/* + * Get the default pthread_attr to use on thread creation. + * + * Some libc, such as musl, don't honor the limit set for the stack size and use + * their own empirically chosen static value. This function checks if the + * current stack size is smaller than the stack size limit and if so returns a + * pthread_attr_t pointer where the thread stack size is set to the soft stack + * size limit. + */ +LTTNG_HIDDEN +pthread_attr_t *default_pthread_attr(void); + #endif /* _DEFAULTS_H */