⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cxdelink.c

📁 上传一个带源代码的嵌入式实时多任务操作系统CMX
💻 C
字号:
/*********************************************************

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

/******************************************************
 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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -