Function esp_idf_svc::sys::esp_pthread_set_cfg
source · pub unsafe extern "C" fn esp_pthread_set_cfg(
cfg: *const esp_pthread_cfg_t,
) -> i32
Expand description
@brief 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.
@note Passing non-NULL attributes to pthread_create() will override the stack_size parameter set using this API
@param cfg The pthread config parameters
@return - ESP_OK if configuration was successfully set - ESP_ERR_NO_MEM if out of memory - ESP_ERR_INVALID_ARG if stack_size is less than PTHREAD_STACK_MIN