Lines Matching refs:semaphore

490 cy_rslt_t cy_rtos_init_semaphore(cy_semaphore_t* semaphore, uint32_t maxcount, uint32_t initcount)  in cy_rtos_init_semaphore()  argument
492 if (semaphore == NULL) in cy_rtos_init_semaphore()
496 semaphore->maxcount = maxcount; in cy_rtos_init_semaphore()
497 return convert_error(tx_semaphore_create(&(semaphore->tx_semaphore), TX_NULL, initcount)); in cy_rtos_init_semaphore()
504 cy_rslt_t cy_rtos_get_semaphore(cy_semaphore_t* semaphore, cy_time_t timeout_ms, bool in_isr) in cy_rtos_get_semaphore() argument
509 if ((semaphore == NULL) || (in_isr && (timeout_ms != 0))) in cy_rtos_get_semaphore()
514 tx_semaphore_get(&(semaphore->tx_semaphore), convert_ms_to_ticks(timeout_ms)); in cy_rtos_get_semaphore()
529 cy_rslt_t cy_rtos_set_semaphore(cy_semaphore_t* semaphore, bool in_isr) in cy_rtos_set_semaphore() argument
532 if (semaphore == NULL) in cy_rtos_set_semaphore()
536 return convert_error(tx_semaphore_ceiling_put(&(semaphore->tx_semaphore), semaphore->maxcount)); in cy_rtos_set_semaphore()
543 cy_rslt_t cy_rtos_get_count_semaphore(cy_semaphore_t* semaphore, size_t* count) in cy_rtos_get_count_semaphore() argument
545 if ((semaphore == NULL) || (count == NULL)) in cy_rtos_get_count_semaphore()
549 return convert_error(tx_semaphore_info_get(&(semaphore->tx_semaphore), TX_NULL, (ULONG*)count, in cy_rtos_get_count_semaphore()
557 cy_rslt_t cy_rtos_deinit_semaphore(cy_semaphore_t* semaphore) in cy_rtos_deinit_semaphore() argument
559 if (semaphore == NULL) in cy_rtos_deinit_semaphore()
563 return convert_error(tx_semaphore_delete(&(semaphore->tx_semaphore))); in cy_rtos_deinit_semaphore()