cxqrst.c

来自「CMEX source code RTOS for atmel atmega12」· C语言 代码 · 共 45 行

C
45
字号
/*********************************************************

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

byte K_Que_Reset(byte queuenum)
{
	QUEHDR *queue_ptr;

	if (queuenum >= MAX_QUEUES)	/* see if queue number within range. */
		{
#ifdef CMXTRACKER
		if (CMXTRACKER_ON)
			{
			cmxtracker_in2(CXQRST_K_ERROR,queuenum);
			}
#endif
		return(K_ERROR);
		}
	K_I_Disable_Sched();	/* set task block. */
	queue_ptr = &queue[queuenum];	/* get address of proper queue handler. */
	/* reset the queue_ptr's variables, that maintain the queue_ptr */
	queue_ptr->queue_cnt = queue_ptr->head = queue_ptr->tail = 0;	
#ifdef CMXTRACKER
		if (CMXTRACKER_ON)
			{
			cmxtracker_in2(CXQRST_K_OK,queuenum);
			}
#endif
	K_I_Func_Return();	/* release task block */
	return(K_OK);	/* return good status. */
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?