diff --git a/System/sv_tick.c b/System/sv_tick.c deleted file mode 100644 index f02d7bb6..00000000 --- a/System/sv_tick.c +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************//** - * @item CosyOS-III Kernel - * @file sv_tick.c - * @brief 滴答服务 - * @details 仅在 SysTick中断 中调用并执行。 - * @author 迟凯峰 - * @version V2.4.1 - * @date 2026.06.24 - ******************************************************************************/ - -#include "os_var.h" -#include "sv_com.h" - -/** - @addtogroup 滴答服务 - @{ - */ - -#if (SYSCFG_SEMAPHORE == __ENABLED__) -/** - \brief 获取计数信号量 - \param[in] hsem 计数信号量句柄 - \return 结果 - \retval false 失败 - \retval true 成功 - */ -bool st_take_semaph(s_semaph_tsp hsem) MCUCFG_OSIT_ATTRIBUTE -{ - s_semaph_t counter = hsem->counter; - if(counter){ - hsem->counter = counter - 1; - return true; - } - return false; -} -#endif - -#if (SYSCFG_MSGQUEUE == __ENABLED__) -/** - \brief 接收消息 - \param[in] hque 队列句柄 - \return 消息指针 - \retval NULL 无消息 - */ -void *st_recv_msg(s_msgque_tsp hque) MCUCFG_OSIT_ATTRIBUTE -{ - void *msg = OS_NULL; - #if (SYSCFG_MSGQUEUE_INTRECV == __ENABLED__) - hque->mutex = false; - #endif - - if(hque->counter){ - if(hque->type == __DYNAMIC__){ - msg = sc_recv_msg_dynque((s_dynque_tsp)hque); - } - else{ - msg = sc_recv_msg_staque((s_staque_tsp)hque); - } - } - - #if (SYSCFG_MSGQUEUE_INTRECV == __ENABLED__) - hque->mutex = true; - #endif - return msg; -} -#endif - -/** @} */