Configure parameters for creating pthread This API allows you to configure how the subsequent pthread_create() call will behave. This call can be used to setup configuration parameters like stack size, priority, configuration inheritance etc. If the 'inherit' flag in the configuration structure is enabled, then the same configuration is also inherited in the thread subtree.
- ESP_OK if configuration was successfully set - ESP_ERR_NO_MEM if out of memory - ESP_ERR_INVALID_ARG if cfg is NULL - ESP_ERR_INVALID_ARG if stack_size is less than PTHREAD_STACK_MIN - ESP_ERR_INVALID_ARG if stack_alloc_caps does not include MALLOC_CAP_8BIT
Notes
If cfg->stack_alloc_caps is 0, it is automatically set to valid default stack memory capabilities. If cfg->stack_alloc_caps is non-zero, the developer is responsible for its correctenss. This function only checks that the capabilities are MALLOC_CAP_8BIT, the rest is unchecked. Passing non-NULL attributes to pthread_create() will override the stack_size parameter set using this API