📄 cxgetptr.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 */
#ifdef CMXTRACKER
#include <cmxtrack.h> /* get cmx include header file */
#endif
/***************************************************************
This function gets the address of a task's task control block.
also tests to see if task was created and if so not removed.
passes back requested task's address so the function that call
this function will be able to work with the requested task's
task control block.
*****************************************************************/
byte K_I_Get_Ptr(byte tskid,tcbpointer *tcbptr)
{
if (tskid > MAX_TASKS || !tskid) /* see if task exists */
return(K_ERROR); /* no, return error */
*tcbptr = &cmx_tcb[tskid]; /* pass address of task TCB back */
if (((tcbpointer)(*tcbptr))->nxttcb) /* see if NOT NULL */
return(K_OK); /* return good status */
else
return(K_ERROR); /* it was so return error */
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -