Lines Matching refs:thread
86 cy_rslt_t cy_rtos_thread_create(cy_thread_t* thread, cy_thread_entry_fn_t entry_function, in cy_rtos_thread_create() argument
91 if ((thread == NULL) || (stack_size < CY_RTOS_MIN_STACK_SIZE)) in cy_rtos_thread_create()
135 *thread = xTaskCreateStatic((TaskFunction_t)entry_function, name, stack_size_rtos, arg, in cy_rtos_thread_create()
137 CY_ASSERT(((void*)*thread == (void*)&(wrapper->task)) || (*thread == NULL)); in cy_rtos_thread_create()
194 cy_rslt_t cy_rtos_thread_terminate(cy_thread_t* thread) in cy_rtos_thread_terminate() argument
197 if (thread == NULL) in cy_rtos_thread_terminate()
203 vTaskDelete(*thread); in cy_rtos_thread_terminate()
205 cy_task_wrapper_t* wrapper = ((cy_task_wrapper_t*)*thread); in cy_rtos_thread_terminate()
223 cy_rslt_t cy_rtos_thread_is_running(cy_thread_t* thread, bool* running) in cy_rtos_thread_is_running() argument
226 if ((thread == NULL) || (running == NULL)) in cy_rtos_thread_is_running()
232 eTaskState st = eTaskGetState(*thread); in cy_rtos_thread_is_running()
243 cy_rslt_t cy_rtos_thread_get_state(cy_thread_t* thread, cy_thread_state_t* state) in cy_rtos_thread_get_state() argument
246 if ((thread == NULL) || (state == NULL)) in cy_rtos_thread_get_state()
252 eTaskState st = eTaskGetState(*thread); in cy_rtos_thread_get_state()
290 cy_rslt_t cy_rtos_thread_join(cy_thread_t* thread) in cy_rtos_thread_join() argument
293 if (thread == NULL) in cy_rtos_thread_join()
299 cy_task_wrapper_t* wrapper = ((cy_task_wrapper_t*)(*thread)); in cy_rtos_thread_join()
305 status = cy_rtos_terminate_thread(thread); in cy_rtos_thread_join()
307 *thread = NULL; in cy_rtos_thread_join()
316 cy_rslt_t cy_rtos_thread_get_handle(cy_thread_t* thread) in cy_rtos_thread_get_handle() argument
320 if (thread == NULL) in cy_rtos_thread_get_handle()
326 *thread = xTaskGetCurrentTaskHandle(); in cy_rtos_thread_get_handle()
357 cy_rslt_t cy_rtos_thread_set_notification(cy_thread_t* thread) in cy_rtos_thread_set_notification() argument
360 if (thread == NULL) in cy_rtos_thread_set_notification()
370 vTaskNotifyGiveFromISR(*thread, &taskWoken); in cy_rtos_thread_set_notification()
376 xTaskNotifyGive(*thread); in cy_rtos_thread_set_notification()
387 cy_rslt_t cy_rtos_thread_get_name(cy_thread_t* thread, const char** thread_name) in cy_rtos_thread_get_name() argument
389 *thread_name = pcTaskGetName(*thread); in cy_rtos_thread_get_name()