Files
cosyos/System/sv_pend.h
零中断延迟的RTOS 32ec5ff04e update 内核文件.
Signed-off-by: 零中断延迟的RTOS <cosyos@139.com>
2026-03-01 09:05:14 +00:00

39 lines
1.6 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**************************************************************************//**
* @item CosyOS-III Kernel
* @file sv_pend.h
* @brief PSV服务
* @details 仅在 PendSV中断 中调用并执行。
* @author 迟凯峰
* @version V2.3.1
* @date 2026.03.01
******************************************************************************/
#ifndef __SV_PEND_H
#define __SV_PEND_H
/**
@addtogroup CosyOS_内核服务
@{
*//**
\defgroup PSV服务
\brief 仅在 PendSV中断 中调用并执行的服务。
包括通过挂起服务调用iPendSVC间接调用在挂起服务钩子pendsv_hook中调用。
如果通过挂起服务调用iPendSVC间接调用就是 FIFO服务
如果通过挂起服务钩子pendsv_hook 调用,就是 FIAG服务。
@{
*/
#define sPSV_ClearDelay() sc_clear_delay() /*!< 清除就绪延时 */
#define sPSV_ResumeTask(htask) sc_resume_task(htask) /*!< 恢复任务 */
#define sPSV_SuspendTask(htask) sc_suspend_task(htask) /*!< 挂起任务 */
#define sPSV_DeleteTask(htask) sc_delete_task(htask) /*!< 删除任务 */
#define sPSV_ClearBlock(htask) sc_clear_block(htask) /*!< 清除阻塞(状态)*/
#define sPSV_SetBlock(htask, tick) sc_set_block(htask, tick) /*!< 设置阻塞(时间)*/
#define sPSV_SetTaskPri(htask, npri) sc_set_taskpri(htask, npri) /*!< 设置任务优先级 */
#define sPSV_GiveBin(bin) sc_write_binary(&bin, true) /*!< 给予二值信号量 */
/** @} */
/** @} */
#endif