cxdelink.c
来自「CMEX source code RTOS for atmel atmega12」· C语言 代码 · 共 38 行
C
38 行
/*********************************************************
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 */
#ifdef CMXTRACKER
#include <cmxtrack.h> /* get cmx include header file */
#endif
/******************************************************
This function will remove a task from the linked list of TCB's.
******************************************************/
void K_I_Unlink(tcbpointer tcbptr)
{
tcbpointer prevtcb;
/* remove the task from linked list */
prevtcb = cmx_tcb;
/* scan TCB's looking for TCB that points to this TCB */
while (prevtcb->nxttcb != tcbptr)
{
prevtcb = prevtcb->nxttcb;
}
prevtcb->nxttcb = tcbptr->nxttcb;
/* the previous tcb nxttcb points to the delink tcb nxttcb */
tcbptr->nxttcb = 0;
/* identify that this task no longers exist */
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?