X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fdefaults.h;h=37d222a784fd0b3564a35b3a845fb8fe88b956e2;hb=93375aa60733caf9d30d45f4a0cff0c0394e46e9;hp=59fe8ec46054b9314e2284c87db5d1a0fa6fe5b9;hpb=7659d4907b24d257f56efb5d666f59a7434dcd3d;p=lttng-tools.git diff --git a/src/common/defaults.h b/src/common/defaults.h index 59fe8ec46..37d222a78 100644 --- a/src/common/defaults.h +++ b/src/common/defaults.h @@ -20,6 +20,7 @@ #ifndef _DEFAULTS_H #define _DEFAULTS_H +#include #include /* Default unix group name for tracing. */ @@ -188,7 +189,7 @@ #define DEFAULT_PYTHON_EVENT_COMPONENT "lttng_python" #define DEFAULT_PYTHON_EVENT_NAME DEFAULT_PYTHON_EVENT_COMPONENT ":*" -#define DEFAULT_CHANNEL_OVERWRITE 0 +#define DEFAULT_CHANNEL_OVERWRITE -1 #define DEFAULT_CHANNEL_TRACEFILE_SIZE CONFIG_DEFAULT_CHANNEL_TRACEFILE_SIZE #define DEFAULT_CHANNEL_TRACEFILE_COUNT CONFIG_DEFAULT_CHANNEL_TRACEFILE_COUNT @@ -309,6 +310,9 @@ /* Default LTTng MI XML namespace. */ #define DEFAULT_LTTNG_MI_NAMESPACE "http://lttng.org/xml/ns/lttng-mi" +/* Default thread stack size; the default mandated by pthread_create(3) */ +#define DEFAULT_LTTNG_THREAD_STACK_SIZE 2097152 + /* * Returns the default subbuf size. * @@ -354,4 +358,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 */