Lines Matching full:if
37 bool detached; ///< True if pthread is detached
71 if (pthread_key_create(&s_pthread_cfg_key, esp_pthread_cfg_key_destructor) != 0) { in esp_pthread_init()
75 if (s_threads_mux == NULL) { in esp_pthread_init()
87 if (val) { in pthread_list_find_item()
96 if (item == desc) { in pthread_get_handle_by_desc()
104 if (hnd == item->handle) { in pthread_get_desc_by_handle()
129 if (cfg->stack_size < PTHREAD_STACK_MIN) { in esp_pthread_set_cfg()
133 /* If a value is already set, update that value */ in esp_pthread_set_cfg()
135 if (!p) { in esp_pthread_set_cfg()
137 if (!p) { in esp_pthread_set_cfg()
149 if (cfg) { in esp_pthread_get_cfg()
185 if (task_arg->cfg.inherit_cfg) { in pthread_task_func()
186 /* If inherit option is set, then do a set_cfg() ourselves for future forks, in pthread_task_func()
210 if (task_arg == NULL) { in pthread_create()
216 if (pthread == NULL) { in pthread_create()
228 if (pthread_cfg) { in pthread_create()
229 if (pthread_cfg->stack_size) { in pthread_create()
232 if (pthread_cfg->prio && pthread_cfg->prio < configMAX_PRIORITIES) { in pthread_create()
236 if (pthread_cfg->inherit_cfg) { in pthread_create()
237 if (pthread_cfg->thread_name == NULL) { in pthread_create()
244 } else if (pthread_cfg->thread_name == NULL) { in pthread_create()
250 if (pthread_cfg->pin_to_core >= 0 && pthread_cfg->pin_to_core < portNUM_PROCESSORS) { in pthread_create()
257 if (attr) { in pthread_create()
286 if (res != pdPASS) { in pthread_create()
290 if (res == errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY) { in pthread_create()
298 if (xSemaphoreTake(s_threads_mux, portMAX_DELAY) != pdTRUE) { in pthread_create()
324 if (xSemaphoreTake(s_threads_mux, portMAX_DELAY) != pdTRUE) { in pthread_join()
328 if (!handle) { in pthread_join()
331 } else if (pthread->detached) { in pthread_join()
334 } else if (pthread->join_task) { in pthread_join()
337 } else if (handle == xTaskGetCurrentTaskHandle()) { in pthread_join()
342 if (cur_pthread && cur_pthread->join_task == handle) { in pthread_join()
346 if (pthread->state == PTHREAD_TASK_STATE_RUN) { in pthread_join()
357 if (ret == 0) { in pthread_join()
358 if (wait) { in pthread_join()
360 if (xSemaphoreTake(s_threads_mux, portMAX_DELAY) != pdTRUE) { in pthread_join()
370 if (retval) { in pthread_join()
383 if (xSemaphoreTake(s_threads_mux, portMAX_DELAY) != pdTRUE) { in pthread_detach()
387 if (!handle) { in pthread_detach()
389 } else if (pthread->detached) { in pthread_detach()
392 } else if (pthread->join_task) { in pthread_detach()
395 } else if (pthread->state == PTHREAD_TASK_STATE_RUN) { in pthread_detach()
415 if (xSemaphoreTake(s_threads_mux, portMAX_DELAY) != pdTRUE) { in pthread_exit()
419 if (!pthread) { in pthread_exit()
422 if (pthread->task_arg) { in pthread_exit()
425 if (pthread->detached) { in pthread_exit()
433 if (pthread->join_task) { in pthread_exit()
444 // note: if this thread is joinable then after giving back s_threads_mux in pthread_exit()
448 if (detached) { in pthread_exit()
472 if (xSemaphoreTake(s_threads_mux, portMAX_DELAY) != pdTRUE) { in pthread_self()
476 if (!pthread) { in pthread_self()
491 if (once_control == NULL || init_routine == NULL || !once_control->is_initialized) { in pthread_once()
497 #if defined(CONFIG_SPIRAM) in pthread_once()
498 if (esp_ptr_external_ram(once_control)) { in pthread_once()
503 #if defined(CONFIG_SPIRAM) in pthread_once()
506 // Check if compare and set was successful in pthread_once()
507 if (res == 0) { in pthread_once()
518 if (attr->type != PTHREAD_MUTEX_NORMAL && in mutexattr_check()
530 if (!mutex) { in pthread_mutex_init()
534 if (attr) { in pthread_mutex_init()
535 if (!attr->is_initialized) { in pthread_mutex_init()
539 if (res) { in pthread_mutex_init()
546 if (!mux) { in pthread_mutex_init()
551 if (mux->type == PTHREAD_MUTEX_RECURSIVE) { in pthread_mutex_init()
556 if (!mux->sem) { in pthread_mutex_init()
572 if (!mutex) { in pthread_mutex_destroy()
575 if ((intptr_t) *mutex == PTHREAD_MUTEX_INITIALIZER) { in pthread_mutex_destroy()
580 if (!mux) { in pthread_mutex_destroy()
584 // check if mux is busy in pthread_mutex_destroy()
586 if (res == EBUSY) { in pthread_mutex_destroy()
590 if (mux->type == PTHREAD_MUTEX_RECURSIVE) { in pthread_mutex_destroy()
595 if (res != pdTRUE) { in pthread_mutex_destroy()
606 if (!mux) { in pthread_mutex_lock_internal()
610 if ((mux->type == PTHREAD_MUTEX_ERRORCHECK) && in pthread_mutex_lock_internal()
615 if (mux->type == PTHREAD_MUTEX_RECURSIVE) { in pthread_mutex_lock_internal()
616 if (xSemaphoreTakeRecursive(mux->sem, tmo) != pdTRUE) { in pthread_mutex_lock_internal()
620 if (xSemaphoreTake(mux->sem, tmo) != pdTRUE) { in pthread_mutex_lock_internal()
631 if ((intptr_t) *mutex == PTHREAD_MUTEX_INITIALIZER) { in pthread_mutex_init_if_static()
633 if ((intptr_t) *mutex == PTHREAD_MUTEX_INITIALIZER) { in pthread_mutex_init_if_static()
643 if (!mutex) { in pthread_mutex_lock()
647 if (res != 0) { in pthread_mutex_lock()
655 if (!mutex) { in pthread_mutex_timedlock()
659 if (res != 0) { in pthread_mutex_timedlock()
669 if (res == EBUSY) { in pthread_mutex_timedlock()
677 if (!mutex) { in pthread_mutex_trylock()
681 if (res != 0) { in pthread_mutex_trylock()
691 if (!mutex) { in pthread_mutex_unlock()
695 if (!mux) { in pthread_mutex_unlock()
699 if (((mux->type == PTHREAD_MUTEX_RECURSIVE) || in pthread_mutex_unlock()
706 if (mux->type == PTHREAD_MUTEX_RECURSIVE) { in pthread_mutex_unlock()
711 if (ret != pdTRUE) { in pthread_mutex_unlock()
719 if (!attr) { in pthread_mutexattr_init()
730 if (!attr) { in pthread_mutexattr_destroy()
739 if (!attr) { in pthread_mutexattr_gettype()
748 if (!attr) { in pthread_mutexattr_settype()
753 if (!res) { in pthread_mutexattr_settype()
762 if (attr) { in pthread_attr_init()
780 if (attr) { in pthread_attr_getstacksize()
789 if (attr && !(stacksize < PTHREAD_STACK_MIN)) { in pthread_attr_setstacksize()
798 if (attr) { in pthread_attr_getdetachstate()
807 if (attr) { in pthread_attr_setdetachstate()