Files
cosyos/System/sv_int_pend.h
零中断延迟的RTOS cbbb8e9ef6 update CosyOS-内核文件.
Signed-off-by: 零中断延迟的RTOS <cosyos@139.com>
2025-08-04 08:53:34 +00:00

38 lines
1.6 KiB
C
Raw 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_int_pend.h
* @brief 中断挂起服务
* @details 仅在 PendSV中断 中调用并执行包括通过挂起服务调用iPendSVC间接调用、
在挂起服务钩子pendsv_hook中调用。
* @author 迟凯峰
* @version V2.0.0
* @date 2025.08.04
******************************************************************************/
#ifndef __SV_INT_PEND_H
#define __SV_INT_PEND_H
/**
@addtogroup CosyOS_内核服务
@{
*//**
\defgroup 中断挂起服务
\brief 仅在 PendSV中断 中调用并执行包括通过挂起服务调用iPendSVC间接调用、
在挂起服务钩子pendsv_hook中调用。
@{
*/
#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