Lines Matching refs:thread
134 cy_rslt_t cy_rtos_thread_create(cy_thread_t* thread, cy_thread_entry_fn_t entry_function, in cy_rtos_thread_create() argument
141 if ((thread == NULL) || (stack_size < CY_RTOS_MIN_STACK_SIZE)) in cy_rtos_thread_create()
185 *thread = osThreadNew((osThreadFunc_t)entry_function, arg, &attr); in cy_rtos_thread_create()
186 CY_ASSERT((*thread == attr.cb_mem) || (*thread == NULL)); in cy_rtos_thread_create()
187 status = (*thread == NULL) ? CY_RTOS_GENERAL_ERROR : CY_RSLT_SUCCESS; in cy_rtos_thread_create()
209 cy_rslt_t cy_rtos_thread_terminate(cy_thread_t* thread) in cy_rtos_thread_terminate() argument
214 if (thread == NULL) in cy_rtos_thread_terminate()
220 statusInternal = osThreadTerminate(*thread); in cy_rtos_thread_terminate()
231 cy_rslt_t cy_rtos_thread_is_running(cy_thread_t* thread, bool* running) in cy_rtos_thread_is_running() argument
235 if ((thread == NULL) || (running == NULL)) in cy_rtos_thread_is_running()
241 *running = (osThreadGetState(*thread) == osThreadRunning) ? true : false; in cy_rtos_thread_is_running()
251 cy_rslt_t cy_rtos_thread_get_state(cy_thread_t* thread, cy_thread_state_t* state) in cy_rtos_thread_get_state() argument
255 if ((thread == NULL) || (state == NULL)) in cy_rtos_thread_get_state()
261 switch (osThreadGetState(*thread)) in cy_rtos_thread_get_state()
298 cy_rslt_t cy_rtos_thread_join(cy_thread_t* thread) in cy_rtos_thread_join() argument
303 if (thread == NULL) in cy_rtos_thread_join()
309 statusInternal = osThreadJoin(*thread); in cy_rtos_thread_join()
314 free(*thread); in cy_rtos_thread_join()
315 *thread = NULL; in cy_rtos_thread_join()
326 cy_rslt_t cy_rtos_thread_get_handle(cy_thread_t* thread) in cy_rtos_thread_get_handle() argument
330 if (thread == NULL) in cy_rtos_thread_get_handle()
336 *thread = osThreadGetId(); in cy_rtos_thread_get_handle()
364 cy_rslt_t cy_rtos_thread_set_notification(cy_thread_t* thread) in cy_rtos_thread_set_notification() argument
369 if (thread == NULL) in cy_rtos_thread_set_notification()
378 ret = osThreadFlagsSet(*thread, CY_RTOS_THREAD_FLAG); in cy_rtos_thread_set_notification()
393 cy_rslt_t cy_rtos_thread_get_name(cy_thread_t* thread, const char** thread_name) in cy_rtos_thread_get_name() argument
395 *thread_name = osThreadGetName(*thread); in cy_rtos_thread_get_name()