cxtend.c
来自「上传一个带源代码的嵌入式实时多任务操作系统CMX」· C语言 代码 · 共 42 行
C
42 行
/*********************************************************
Copyright (c) CMX Company. 1999. All rights reserved
*********************************************************/
/* version 5.30 */
#define CMXMODULE 1
#include <cxfuncs.h> /* get cmx include header file */
#include <cxextern.h> /* get cmx include header file */
#if (defined(CMXTRACKER) || defined(WINTRACKER))
#include <cmxtrack.h> /* get cmx include header file */
#endif
/************************************************************
task done routine, all task's that are finished their code,
will MUST be returned to here. If a task is going to hit it's
end brace, it MUST call the following function.
This function will then decide if the task should be
placed into the IDLE state or READY state because outstanding
triggers (caused by the K_Task_Start function) are present.
**************************************************************/
void K_Task_End(void)
{
K_I_Disable_Sched(); /* set task block */
#if (defined(CMXTRACKER) || defined(WINTRACKER))
if (CMXTRACKER_ON)
{
cmxtracker_in1(CXTEND_CALL);
}
#endif
/* now test to see if task has any outstanding start requests.
If so, place task into READY state, if not IDLE state. */
activetcb->tcbstate = (--activetcb->trig) ? READY : IDLE;
PREEMPTED; /* set the preempted scheduling flag */
K_I_Func_Return(); /* release task block */
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?